sync
Some checks are pending
format / format (push) Waiting to run
snapshot / publish (push) Waiting to run
test / test (push) Waiting to run

This commit is contained in:
Dax Raad 2025-10-20 21:39:01 -04:00
parent 95a34a2abb
commit dd27ba199a
2 changed files with 7 additions and 5 deletions

View file

@ -205,7 +205,6 @@ export function Autocomplete(props: {
})
const options = createMemo(() => {
console.log(agents())
const mixed: AutocompleteOption[] = (store.visible === "@" ? [...agents(), ...files()] : [...commands()]).filter(
(x) => x.disabled !== true,
)
@ -224,6 +223,7 @@ export function Autocomplete(props: {
function move(direction: -1 | 1) {
if (!store.visible) return
if (!options().length) return
let next = store.selected + direction
if (next < 0) next = options().length - 1
if (next >= options().length) next = 0

View file

@ -211,10 +211,12 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
// non-blocking
Promise.all([
sdk.client.session.list().then((x) => {
const sessions = (x.data ?? []).slice().sort((a, b) => a.id.localeCompare(b.id))
setStore("session", sessions)
}),
sdk.client.session.list().then((x) =>
setStore(
"session",
(x.data ?? []).toSorted((a, b) => a.id.localeCompare(b.id)),
),
),
sdk.client.command.list().then((x) => setStore("command", x.data ?? [])),
sdk.client.lsp.status().then((x) => setStore("lsp", x.data!)),
sdk.client.mcp.status().then((x) => setStore("mcp", x.data!)),