From e15d360ee49e292a200a2b525c01cbac33f04d42 Mon Sep 17 00:00:00 2001 From: Kieran Klukas Date: Tue, 16 Jun 2026 12:26:31 -0400 Subject: [PATCH] feat: command bar --- pwa/src/api.ts | 24 +++++ pwa/src/chat.ts | 26 ++--- pwa/src/connect.ts | 11 +++ pwa/src/palette.ts | 232 +++++++++++++++++++++++++++++++++++++++++++++ pwa/src/state.ts | 4 + pwa/src/styles.css | 57 +++++++++++ 6 files changed, 342 insertions(+), 12 deletions(-) create mode 100644 pwa/src/palette.ts diff --git a/pwa/src/api.ts b/pwa/src/api.ts index 7b5dc86..2b31bb4 100644 --- a/pwa/src/api.ts +++ b/pwa/src/api.ts @@ -52,4 +52,28 @@ export class APIClient { grantPermission(wsID: string, grant: { permission: PermissionRequest; action: string }): Promise { return this.request('POST', `workspaces/${wsID}/permissions/grant`, grant); } + + getAgentInfo(wsID: string): Promise { + return this.request('GET', `workspaces/${wsID}/agent`); + } + + setPermissionMode(wsID: string, mode: 'normal' | 'yolo' | 'super_yolo'): Promise { + return this.request('POST', `workspaces/${wsID}/permissions/mode`, { mode }); + } +} + +export interface AgentInfo { + is_busy: boolean; + is_ready: boolean; + model: { + id: string; + name: string; + can_reason: boolean; + context_window: number; + }; + model_cfg: { + model: string; + provider: string; + reasoning_effort: string; + }; } diff --git a/pwa/src/chat.ts b/pwa/src/chat.ts index 3b2c1b2..0c96626 100644 --- a/pwa/src/chat.ts +++ b/pwa/src/chat.ts @@ -1,6 +1,7 @@ import { state, escapeHTML, renderPart, deferHighlightAll } from './state'; import { handleDisconnect } from './connect'; import type { Message } from './types'; +import { updateSidebarYolo } from './palette'; declare const lucide: { createIcons: () => void } | undefined; export function initIcons() { try { lucide?.createIcons(); } catch {} } @@ -28,7 +29,11 @@ export function renderChat(): void { +