fix(cli): exclude anonymous kilo provider from connected check

The kilo provider always autoloads with free models and apiKey="anonymous",
causing useConnected() to return true even for first-time users without any
API key. This prevented the onboarding tip from ever appearing.
This commit is contained in:
Alex Alecu
2026-03-19 16:20:06 +02:00
parent 6d42e22a6e
commit 4be714dbf9
2 changed files with 8 additions and 2 deletions
@@ -10,8 +10,11 @@ import * as fuzzysort from "fuzzysort"
export function useConnected() {
const sync = useSync()
// kilocode_change - exclude "kilo" (anonymous autoload) alongside "opencode"
return createMemo(() =>
sync.data.provider.some((x) => x.id !== "opencode" || Object.values(x.models).some((y) => y.cost?.input !== 0)),
sync.data.provider.some(
(x) => (x.id !== "opencode" && x.id !== "kilo") || Object.values(x.models).some((y) => y.cost?.input !== 0),
),
)
}
@@ -64,7 +64,10 @@ export function Sidebar(props: { sessionID: string; overlay?: boolean }) {
const kv = useKV()
const hasProviders = createMemo(() =>
sync.data.provider.some((x) => x.id !== "opencode" || Object.values(x.models).some((y) => y.cost?.input !== 0)),
// kilocode_change - exclude "kilo" (anonymous autoload) alongside "opencode"
sync.data.provider.some(
(x) => (x.id !== "opencode" && x.id !== "kilo") || Object.values(x.models).some((y) => y.cost?.input !== 0),
),
)
const gettingStartedDismissed = createMemo(() => kv.get("dismissed_getting_started", false))