Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button } from "@kilocode/kilo-web-ui/button"
import { Card } from "@kilocode/kilo-web-ui/card"
import { CustomSelect, type SelectOption } from "../../components/CustomSelect"
import { ConfigPage, ConfigTag as Tag } from "./ConfigPage"
import { ConfigPage, ConfigToggle as Toggle } from "./ConfigPage"
import { type TitleIcon, useTuiNotificationSettings } from "./state/ui"

const icons = [
Expand All @@ -10,31 +10,6 @@ const icons = [
{ value: "emojis", label: "Emojis" },
] satisfies SelectOption<TitleIcon>[]

function Toggle(props: {
label: string
description: string
checked: boolean
disabled?: boolean
onChange: () => void
}) {
return (
<button
class="ui-toggle"
classList={{ selected: props.checked }}
type="button"
aria-pressed={props.checked}
disabled={props.disabled}
onClick={props.onChange}
>
<span>
<strong>{props.label}</strong>
<small>{props.description}</small>
</span>
<Tag tone={props.checked ? "success" : "neutral"}>{props.checked ? "On" : "Off"}</Tag>
</button>
)
}

export function CliNotificationsRoute() {
const state = useTuiNotificationSettings()

Expand Down
27 changes: 1 addition & 26 deletions packages/kilo-console/src/routes/config/CliUiRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from "@kilocode/kilo-web-ui/button"
import { Card } from "@kilocode/kilo-web-ui/card"
import { CustomSelect, type SelectOption } from "../../components/CustomSelect"
import { SearchField } from "../../components/SearchField"
import { ConfigPage, ConfigTag as Tag } from "./ConfigPage"
import { ConfigPage, ConfigToggle as Toggle } from "./ConfigPage"
import { type Theme, themeTitle, useTuiUiSettings } from "./state/ui"

const diffs = [
Expand Down Expand Up @@ -31,31 +31,6 @@ function ThemePreview(props: { item: Theme }) {
)
}

function Toggle(props: {
label: string
description: string
checked: boolean
disabled?: boolean
onChange: () => void
}) {
return (
<button
class="ui-toggle"
classList={{ selected: props.checked }}
type="button"
aria-pressed={props.checked}
disabled={props.disabled}
onClick={props.onChange}
>
<span>
<strong>{props.label}</strong>
<small>{props.description}</small>
</span>
<Tag tone={props.checked ? "success" : "neutral"}>{props.checked ? "On" : "Off"}</Tag>
</button>
)
}

export function CliUiRoute() {
const state = useTuiUiSettings()

Expand Down
25 changes: 25 additions & 0 deletions packages/kilo-console/src/routes/config/ConfigPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ export function ConfigToolbar(props: {
)
}

export function ConfigToggle(props: {
label: string
description: string
checked: boolean
disabled?: boolean
onChange: () => void
}) {
return (
<button
class="ui-toggle"
classList={{ selected: props.checked }}
type="button"
aria-pressed={props.checked}
disabled={props.disabled}
onClick={props.onChange}
>
<span>
<strong>{props.label}</strong>
<small>{props.description}</small>
</span>
<ConfigTag tone={props.checked ? "success" : "neutral"}>{props.checked ? "On" : "Off"}</ConfigTag>
</button>
)
}

export function SourceBadge(props: { source?: string; inherited?: boolean; overridden?: boolean }) {
return <UiSourceBadge {...props} />
}
12 changes: 0 additions & 12 deletions script/kilocode-duplication-allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@
"owner": "kilo-console",
"reason": "Existing duplication before the ratchet; remove through a focused, behavior-preserving extraction."
},
{
"files": [
"packages/kilo-console/src/routes/config/CliNotificationsRoute.tsx",
"packages/kilo-console/src/routes/config/CliUiRoute.tsx"
],
"fingerprint": "3d8c2a788d682c4e",
"maxMatches": 1,
"maxTokens": 143,
"kind": "legacy",
"owner": "kilo-console",
"reason": "Existing duplication before the ratchet; remove through a focused, behavior-preserving extraction."
},
{
"files": [
"packages/kilo-console/src/routes/config/state/agents.ts",
Expand Down
Loading