MCPcopy
hub / github.com/anomalyco/opencode / useConnected

Function useConnected

packages/tui/src/component/use-connected.tsx:4–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { useSync } from "../context/sync"
3
4export function useConnected() {
5 const sync = useSync()
6 return createMemo(() =>
7 sync.data.provider.some(
8 (provider) =>
9 provider.id !== "opencode" || Object.values(provider.models).some((model) => model.cost?.input !== 0),
10 ),
11 )
12}

Callers 4

AppFunction · 0.90
DialogModelFunction · 0.90
FooterFunction · 0.90

Calls 2

useSyncFunction · 0.90
valuesMethod · 0.45

Tested by

no test coverage detected