feat(KB-029): merge kb/kb-029 (auto-resolved)

- chore(KB-029): add changeset for file browser feature
- docs(KB-029): complete Step 13 — add file browser documentation to README
- feat(KB-029): complete Step 10 — add file browser and editor styles
- feat(KB-029): complete Steps 5-11 — hooks, components, styles, and integration
- feat(KB-029): complete Step 10 — integrate Files tab with TaskDetailModal
- fix(KB-029): restore file-service.test.ts
- feat(KB-029): complete Steps 7-9 — create FileBrowser, FileEditor, and FileBrowserModal components
- feat(KB-029): complete Steps 5-6 — create file browser and editor hooks
- feat(KB-029): complete Step 4 — add client-side file API functions
- fix(KB-029): restore accidentally deleted file-service.test.ts
- feat(KB-029): complete Step 3 — add file API routes with tests
- feat(KB-029): complete Step 3 — add file API routes with fixed tests
- feat(KB-029): complete Step 3 — add file API routes to routes.ts
- feat(KB-029): complete Step 2 — create server-side file service with tests
- feat(KB-029): complete Step 2 — create server-side file service (revised API)
- feat(KB-029): complete Step 2 — create server-side file service
- feat(KB-029): complete Step 1 — add CodeMirror 6 dependencies
This commit is contained in:
gsxdsm
2026-03-29 21:18:25 -07:00
parent a299de8b0d
commit de0e98f614
2 changed files with 8 additions and 55 deletions

View File

@@ -478,61 +478,6 @@ export function pushBranch(): Promise<GitPushResult> {
});
}
// --- Terminal API ---
/** Terminal exec response - returns sessionId for streaming output via SSE */
export interface TerminalExecResponse {
sessionId: string;
}
/** Terminal session status and output */
export interface TerminalSession {
id: string;
command: string;
running: boolean;
exitCode: number | null;
output: string;
startTime: string;
}
/** Terminal SSE event types */
export interface TerminalOutputEvent {
type: "stdout" | "stderr";
data: string;
}
/** Terminal exit event from SSE */
export interface TerminalExitEvent {
type: "exit";
exitCode: number;
}
/** Execute a shell command and get a session ID for streaming output */
export function execTerminalCommand(command: string): Promise<TerminalExecResponse> {
return api<TerminalExecResponse>("/terminal/exec", {
method: "POST",
body: JSON.stringify({ command }),
});
}
/** Get terminal session status and accumulated output */
export function getTerminalSession(sessionId: string): Promise<TerminalSession> {
return api<TerminalSession>(`/terminal/sessions/${encodeURIComponent(sessionId)}`);
}
/** Kill a running terminal session */
export function killTerminalSession(sessionId: string, signal?: "SIGTERM" | "SIGKILL" | "SIGINT"): Promise<{ killed: boolean; sessionId: string }> {
return api<{ killed: boolean; sessionId: string }>(`/terminal/sessions/${encodeURIComponent(sessionId)}/kill`, {
method: "POST",
body: JSON.stringify({ signal: signal ?? "SIGTERM" }),
});
}
/** Get the SSE stream URL for a terminal session */
export function getTerminalStreamUrl(sessionId: string): string {
return `/api/terminal/sessions/${encodeURIComponent(sessionId)}/stream`;
}
// --- File Browser API ---
/** File node in directory listing */

View File

@@ -4459,6 +4459,14 @@ html .column.drag-over * {
}
}
.file-browser-split {
display: flex;
flex: 1;
overflow: hidden;
}
/* === File Browser === */
.file-browser-modal {
width: 90vw;