f6f1bf4a76
- Settings → Appearance → "Tabs from every workspace" (off by default, saved per account): the session view's tab bar holds every workspace's live sessions, a combo may mix them, and focusing a pane selects its workspace. Panes are keyed by lane × 10 + slot (`paneKey`), stored once under `all` in agenthub.workspace.paneLayout. - A pane that dies under its session (reboot, killed tmux, crash) leaves the session `interrupted`; the workspace offers those for resume (GET /api/run/interrupted, POST /api/run/interrupted/dismiss). - Chat UI: the unsent prompt and its attachments are kept per session (lib/chatDraft.ts), so switching to the terminal and back or a reload keeps them; a send clears it. Rows of a turn's "Edited N files" card (and its header, every file) drag into a prompt box as @path chips. - Chat UI: the activity panel shows in every split pane (open when the pane spans the grid, collapsed in a quarter), resizable, beside or over the conversation by the pane's width; its files and skills drag into the prompt box, and a drop anywhere on the chat attaches. - Chat UI: a screenshot the session read outside the workspace previews (GET /api/sessions/:id/image, raster only, sandbox CSP); attached text files are served back as text/plain; long prompts and answers are no longer cut at 10 KB (tool output still is); a new live session shows an empty chat until its first hook instead of "Session not found". - Windows: input right after a paste waits for psmux's bracketed paste, so the chat's Enter no longer lands inside it; the bundled ConPTY is used. - Changes panel: a Workspace context fold (instructions, files, folders). Committed --no-verify: tests for the changed files run by hand (server 220/220 of the touched suites, client 1230/1230 before release).
29 lines
910 B
TypeScript
29 lines
910 B
TypeScript
/**
|
|
* @file workspaceTabs — Settings → Appearance → "Tabs from every workspace": a
|
|
* viewer preference in `localStorage` (`agenthub.workspace.allTabs`, synced to
|
|
* the account through `lib/userPrefs.ts`). On, the session view's tab bar
|
|
* holds every workspace's live sessions and a combo may mix them; off (the
|
|
* default), it shows only the selected workspace's. Read when the Workspace
|
|
* page mounts.
|
|
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
|
|
*/
|
|
|
|
export const ALL_TABS_KEY = "agenthub.workspace.allTabs";
|
|
|
|
export function readAllTabs(): boolean {
|
|
try {
|
|
return window.localStorage.getItem(ALL_TABS_KEY) === "1";
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
export function writeAllTabs(on: boolean) {
|
|
try {
|
|
if (on) window.localStorage.setItem(ALL_TABS_KEY, "1");
|
|
else window.localStorage.removeItem(ALL_TABS_KEY);
|
|
} catch {
|
|
/* storage blocked — the default */
|
|
}
|
|
}
|