@kabmo-labs/kabmo 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +319 -319
- package/dist/client/static/js/index-bnrrw242.css +1 -0
- package/dist/client/static/js/{index-vzb1qz51.js → index-w6jx0h0p.js} +780 -780
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/server/ring.test.ts +41 -0
- package/marketplace/plugins/command-runner/src/server/run-types.ts +6 -0
- package/marketplace/plugins/command-runner/src/server/runner-harness.ts +69 -0
- package/marketplace/plugins/command-runner/src/server/runner-path.test.ts +127 -0
- package/marketplace/plugins/command-runner/src/server/runner.test.ts +2 -72
- package/marketplace/plugins/command-runner/src/server/runner.ts +31 -3
- package/package.json +2 -2
- package/src/client/components/common/batch-selection/BatchActionBar.test.ts +42 -5
- package/src/client/components/common/batch-selection/BatchActionBar.tsx +57 -14
- package/src/client/components/common/code-surface/extensions.ts +7 -1
- package/src/client/components/common/code-surface/fold-placeholder.ts +43 -0
- package/src/client/components/common/session-row/StatusSlot.tsx +133 -0
- package/src/client/components/common/session-row/TrailingSlot.tsx +84 -0
- package/src/client/components/common/session-row/index.tsx +215 -0
- package/src/client/components/common/session-row/session-row.test.tsx +154 -0
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +121 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +99 -112
- package/src/client/components/layout/session-sidebar/Toolbar.tsx +2 -2
- package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +149 -0
- package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +150 -0
- package/src/client/components/layout/session-sidebar/modern/SearchField.tsx +75 -0
- package/src/client/components/layout/session-sidebar/modern/Skeleton.tsx +56 -0
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +193 -0
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +333 -0
- package/src/client/components/layout/session-sidebar/modern/index.tsx +147 -0
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +111 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +73 -0
- package/src/client/components/mobile/SessionSidebar.tsx +137 -146
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +140 -0
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +3 -3
- package/src/client/components/mobile/mobile-session-sidebar/use-drawer.ts +104 -0
- package/src/client/components/settings/Modal.tsx +5 -27
- package/src/client/components/settings/Sidebar.tsx +1 -1
- package/src/client/components/settings/apply-side-effects.test.ts +102 -0
- package/src/client/components/settings/apply-side-effects.ts +90 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +11 -1
- package/src/client/components/settings/categories/ChatSettings.test.tsx +121 -0
- package/src/client/components/settings/categories/ChatSettings.tsx +80 -15
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +157 -0
- package/src/client/components/settings/categories/chat-settings/ComposerStyleSection.tsx +177 -0
- package/src/client/components/settings/categories/chat-settings/LayoutSection.tsx +1 -1
- package/src/client/components/settings/categories/chat-settings/SidebarList.tsx +73 -0
- package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +144 -0
- package/src/client/components/settings/categories/chat-settings/groups.test.ts +42 -0
- package/src/client/components/settings/categories/chat-settings/groups.ts +81 -0
- package/src/client/components/settings/categories/usage-settings/usage-and-picker.test.ts +1 -68
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +7 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +15 -5
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +90 -41
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +13 -6
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +117 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +117 -75
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.test.ts +28 -8
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +48 -4
- package/src/client/components/workspace/chat-timeline/TurnRail.tsx +64 -0
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +178 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerNotice.tsx +50 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +178 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +102 -122
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +7 -0
- package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +111 -0
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +181 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FrameControl.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/approval-gate.test.tsx +31 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/plugin-renderers.ts +6 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +98 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolCardShell.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/status-glyph.tsx +56 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.ts +19 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +132 -0
- package/src/client/components/workspace/chat-timeline/{ToolCallCard.plugin.test.ts → tool-renderers/styles/Card.plugin.test.ts} +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +60 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +89 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +72 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +84 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/props.ts +22 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +153 -0
- package/src/client/components/workspace/diff-panel/folding.ts +6 -1
- package/src/client/components/workspace/editor/viewers/SvgPreview.tsx +16 -2
- package/src/client/components/workspace/model-dropdown/Item.plugin.test.ts +86 -12
- package/src/client/components/workspace/model-dropdown/Item.tsx +56 -19
- package/src/client/components/workspace/model-dropdown/Panel.tsx +21 -13
- package/src/client/components/workspace/model-dropdown/Section.test.tsx +114 -4
- package/src/client/components/workspace/model-dropdown/Section.tsx +21 -9
- package/src/client/components/workspace/model-dropdown/groups.test.ts +164 -1
- package/src/client/components/workspace/model-dropdown/groups.ts +94 -17
- package/src/client/components/workspace/model-dropdown/index.tsx +27 -19
- package/src/client/data/settings/omp-schema.json +151 -6
- package/src/client/hooks/chat/composer/style.ts +66 -0
- package/src/client/hooks/chat/timeline/row-window-reveal.ts +130 -0
- package/src/client/hooks/chat/timeline/row-window.test.ts +35 -0
- package/src/client/hooks/chat/timeline/row-window.ts +59 -133
- package/src/client/hooks/chat/timeline/thinking-open.ts +67 -0
- package/src/client/hooks/chat/timeline/tool-render-mode.ts +65 -0
- package/src/client/hooks/settings/providers/login.ts +11 -2
- package/src/client/hooks/ui/window-event.ts +20 -4
- package/src/client/hooks/workspace/batch-archive-run.ts +47 -0
- package/src/client/hooks/workspace/batch-archive.test.ts +59 -0
- package/src/client/hooks/workspace/batch-archive.ts +78 -0
- package/src/client/hooks/workspace/sidebar-batch.ts +95 -0
- package/src/client/hooks/workspace/sidebar-style.ts +66 -0
- package/src/client/tailwind.css +111 -0
- package/src/server/index.ts +10 -134
- package/src/server/lib/lifecycle/after-listen.ts +178 -0
- package/src/server/lib/lifecycle/rejection-guard.test.ts +79 -0
- package/src/server/lib/lifecycle/rejection-guard.ts +74 -0
- package/src/server/lib/lifecycle/tls.test.ts +7 -7
- package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +131 -0
- package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +46 -0
- package/src/server/lib/omp/rpc/frame-fold.test.ts +1 -100
- package/src/server/lib/omp/rpc/frame-fold.ts +13 -0
- package/src/server/lib/plugins/background.server.ts +17 -1
- package/src/server/lib/plugins/background.test.ts +33 -0
- package/src/server/routes/sessions/batch-archive.test.ts +113 -0
- package/src/server/routes/sessions/batch-archive.ts +80 -0
- package/src/server/routes/sessions/index.ts +4 -0
- package/src/shared/lib/chat/composer/style.test.ts +126 -0
- package/src/shared/lib/chat/composer/style.ts +171 -0
- package/src/shared/lib/chat/composer/tui-only.test.ts +3 -0
- package/src/shared/lib/chat/composer/tui-only.ts +5 -0
- package/src/shared/lib/chat/timeline/block-chrome.ts +129 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +51 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +74 -0
- package/src/shared/lib/chat/timeline/trace-groups.test.ts +132 -0
- package/src/shared/lib/chat/timeline/trace-groups.ts +95 -0
- package/src/shared/lib/settings/defaults.ts +6 -0
- package/src/shared/lib/workspace/session-focus.test.ts +93 -0
- package/src/shared/lib/workspace/session-focus.ts +71 -0
- package/src/shared/lib/workspace/session-state/store.ts +5 -0
- package/src/shared/lib/workspace/sidebar-filter-row.test.ts +73 -0
- package/src/shared/lib/workspace/sidebar-filter-row.ts +86 -0
- package/src/shared/lib/workspace/sidebar-style.test.ts +58 -0
- package/src/shared/lib/workspace/sidebar-style.ts +86 -0
- package/src/shared/types/omp/agent.ts +6 -0
- package/src/shared/types/settings/state.ts +31 -0
- package/dist/client/static/js/index-68w8h33q.css +0 -1
- package/src/client/components/workspace/chat-timeline/ToolCallCard.tsx +0 -194
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How the `modern` sidebar's filter row spends its width on the Select control.
|
|
8
|
+
*
|
|
9
|
+
* The row is `All · Running · Archived` plus the way into batch selection, and
|
|
10
|
+
* it must never wrap: a second line of chips pushes the list down and reads as a
|
|
11
|
+
* layout break. The two forms are therefore chosen by MEASURED width, the same
|
|
12
|
+
* way the classic toolbar picks its visible controls (`sidebarToolbarCapacity`),
|
|
13
|
+
* and for the same reason — the sidebar is draggable, so a media query or a
|
|
14
|
+
* `@container` breakpoint would keep a narrow form after the user widened the
|
|
15
|
+
* panel.
|
|
16
|
+
*
|
|
17
|
+
* - `button` — a 28px glyph pinned to the row's trailing edge. This is the form
|
|
18
|
+
* at the 280px default and at the 264px floor.
|
|
19
|
+
* - `chip` — a fourth chip, in the same trailing slot. It only fits once the
|
|
20
|
+
* sidebar is wide enough for four chips.
|
|
21
|
+
*
|
|
22
|
+
* **The form changes the Select control, never the chip group.** All, Running
|
|
23
|
+
* and Archived keep the row's left edge in both forms — they are a reading order
|
|
24
|
+
* that sits under the search field and over the rows, so moving them sideways
|
|
25
|
+
* when the fourth chip appears made the filters jump as the panel was dragged.
|
|
26
|
+
*
|
|
27
|
+
* The metrics are the chips' own rendered widths at `text-[11px]` with
|
|
28
|
+
* `px-2`/`gap-1`, measured in the browser at the 280px default. They are
|
|
29
|
+
* constants rather than a render-time measurement of the children because the
|
|
30
|
+
* FORM has to be decided before the children exist — measuring after paint would
|
|
31
|
+
* draw the wrong form for a frame, which is the flicker `useToolbarRowWidth`'s
|
|
32
|
+
* layout effect exists to avoid.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/** The row's own `px-3`, which `clientWidth` counts and the budget must not. */
|
|
36
|
+
export const FILTER_ROW_PADDING_PX = 24;
|
|
37
|
+
|
|
38
|
+
/** The row's `gap-1`, between chips and before the trailing control. */
|
|
39
|
+
export const FILTER_ROW_GAP_PX = 4;
|
|
40
|
+
|
|
41
|
+
/** The two chip forms, measured at `text-[11px] font-medium`. */
|
|
42
|
+
export const FILTER_CHIP_PX = {
|
|
43
|
+
all: 32,
|
|
44
|
+
running: 72,
|
|
45
|
+
/** The count badge inside `Running`, when there is something to count. */
|
|
46
|
+
runningCount: 14,
|
|
47
|
+
archived: 79,
|
|
48
|
+
/** The Select chip: icon, the word, and its padding. */
|
|
49
|
+
select: 66,
|
|
50
|
+
} as const;
|
|
51
|
+
|
|
52
|
+
/** The trailing glyph (`h-7 w-7`). */
|
|
53
|
+
export const FILTER_SELECT_BUTTON_PX = 28;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The width the chip group needs for a given running count.
|
|
57
|
+
*
|
|
58
|
+
* Exported because the answer is the threshold both forms are compared
|
|
59
|
+
* against — a caller that recomputes it would drift from the chips it budgets
|
|
60
|
+
* for.
|
|
61
|
+
*/
|
|
62
|
+
export function filterChipGroupWidth(runningCount: number, includeSelect: boolean): number {
|
|
63
|
+
const chips = [
|
|
64
|
+
FILTER_CHIP_PX.all,
|
|
65
|
+
FILTER_CHIP_PX.running + (runningCount > 0 ? FILTER_CHIP_PX.runningCount : 0),
|
|
66
|
+
FILTER_CHIP_PX.archived,
|
|
67
|
+
...(includeSelect ? [FILTER_CHIP_PX.select] : []),
|
|
68
|
+
];
|
|
69
|
+
return chips.reduce((sum, width) => sum + width, 0) + (chips.length - 1) * FILTER_ROW_GAP_PX;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Which form the Select control takes in a row `available` px wide.
|
|
74
|
+
*
|
|
75
|
+
* The caller right-aligns the control itself; the chips it is measured against
|
|
76
|
+
* stay at the row's left edge.
|
|
77
|
+
*
|
|
78
|
+
* `available` is the row's CONTENT width (the caller's `px-3` already
|
|
79
|
+
* subtracted). A row that reports `0` — a collapsed panel, or a layout that has
|
|
80
|
+
* not run yet — keeps the `button` form: it is the narrowest, so it is the
|
|
81
|
+
* answer that can never be wrong.
|
|
82
|
+
*/
|
|
83
|
+
export function filterSelectForm(available: number, runningCount: number): 'button' | 'chip' {
|
|
84
|
+
if (!(available > 0)) return 'button';
|
|
85
|
+
return filterChipGroupWidth(runningCount, true) <= available ? 'chip' : 'button';
|
|
86
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The sidebar style setting's contract.
|
|
8
|
+
*
|
|
9
|
+
* The value is stored in the `kabmo_settings` blob and read on every render of
|
|
10
|
+
* the left column, so the two failure modes worth pinning are:
|
|
11
|
+
*
|
|
12
|
+
* - **an unknown value must resolve to `classic`.** A blob written by a newer
|
|
13
|
+
* build, a hand-edited row, or a downgrade would otherwise name a renderer
|
|
14
|
+
* that does not exist in this build.
|
|
15
|
+
* - **the default must stay `classic`.** It is what an upgrade renders, and the
|
|
16
|
+
* setting exists so a user opts IN to a different chrome — flipping the
|
|
17
|
+
* default silently rearranges a sidebar nobody asked to change.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { describe, expect, test } from 'bun:test';
|
|
21
|
+
import {
|
|
22
|
+
DEFAULT_SIDEBAR_STYLE,
|
|
23
|
+
SIDEBAR_STYLES,
|
|
24
|
+
SIDEBAR_STYLE_COPY,
|
|
25
|
+
isSidebarStyle,
|
|
26
|
+
resolveSidebarStyle,
|
|
27
|
+
} from '@/shared/lib/workspace/sidebar-style';
|
|
28
|
+
|
|
29
|
+
describe('resolveSidebarStyle', () => {
|
|
30
|
+
test('the shipped default is classic, so an upgrade rearranges nothing', () => {
|
|
31
|
+
expect(DEFAULT_SIDEBAR_STYLE).toBe('classic');
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('every style this build can draw resolves to itself', () => {
|
|
35
|
+
for (const style of SIDEBAR_STYLES) {
|
|
36
|
+
expect(resolveSidebarStyle(style)).toBe(style);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('an unknown value falls back to the default rather than to a missing renderer', () => {
|
|
41
|
+
for (const value of ['sidebar-2', '', 'Modern', null, undefined, 0, {}, []]) {
|
|
42
|
+
expect(resolveSidebarStyle(value)).toBe(DEFAULT_SIDEBAR_STYLE);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('the guard agrees with the resolver', () => {
|
|
47
|
+
expect(isSidebarStyle('modern')).toBe(true);
|
|
48
|
+
expect(isSidebarStyle('classic')).toBe(true);
|
|
49
|
+
expect(isSidebarStyle('MODERN')).toBe(false);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('every style has copy, so the settings card cannot render an empty label', () => {
|
|
53
|
+
for (const style of SIDEBAR_STYLES) {
|
|
54
|
+
expect(SIDEBAR_STYLE_COPY[style].label.length).toBeGreaterThan(0);
|
|
55
|
+
expect(SIDEBAR_STYLE_COPY[style].description.length).toBeGreaterThan(0);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Which chrome the session sidebar draws, as ONE of two styles.
|
|
8
|
+
*
|
|
9
|
+
* This is a PRESENTATION choice over a single data source, not a second
|
|
10
|
+
* sidebar: both styles render the same folders, the same rows, the same
|
|
11
|
+
* actions and the same dialogs, because the data, the controller and every
|
|
12
|
+
* mutation live in the view that owns them (`SessionsView`). A style only picks
|
|
13
|
+
* the frame — a control that exists in one style and not the other is a bug,
|
|
14
|
+
* which is why the shared row and the shared workspace section are primitives
|
|
15
|
+
* rather than two copies.
|
|
16
|
+
*
|
|
17
|
+
* - `classic` — the toolbar of boxed icons and the 24px rows Kabmo has always
|
|
18
|
+
* shipped. It is the DEFAULT, deliberately: an upgrade must not rearrange a
|
|
19
|
+
* sidebar the user did not ask to change (the same rule
|
|
20
|
+
* `DEFAULT_TOOL_RENDER_MODE` follows).
|
|
21
|
+
* - `modern` — a permanent search field, filter chips, sticky workspace
|
|
22
|
+
* headers and a taller row whose trailing column is shared by the age and
|
|
23
|
+
* the actions trigger.
|
|
24
|
+
*
|
|
25
|
+
* **The names and the copy live here**; the markup lives in
|
|
26
|
+
* `layout/session-sidebar/modern/`. A style added here without a renderer is a
|
|
27
|
+
* build error at the switch in `SessionsView`, not a silent fallback.
|
|
28
|
+
*
|
|
29
|
+
* Global, not per-session, and ONE value for desktop and phone: the shape of a
|
|
30
|
+
* list is a property of the person and the display, not of one conversation,
|
|
31
|
+
* and two knobs would be two axes to drift along.
|
|
32
|
+
*
|
|
33
|
+
* This module is deliberately dependency-free: it is imported by
|
|
34
|
+
* `shared/types/settings/state.ts` (for the `SidebarStyle` field type), so a
|
|
35
|
+
* type import back the other way would be a cycle. The `app_settings` key
|
|
36
|
+
* lives with its live-apply hook (`client/hooks/workspace/sidebar-style.ts`),
|
|
37
|
+
* exactly as the tool-render style splits them.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export type SidebarStyle = 'classic' | 'modern';
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The style a document with no stored preference renders at — the one Kabmo
|
|
45
|
+
* shipped before the setting existed, so an upgrade changes nothing.
|
|
46
|
+
*/
|
|
47
|
+
export const DEFAULT_SIDEBAR_STYLE: SidebarStyle = 'classic';
|
|
48
|
+
|
|
49
|
+
/** Every style, in the order the settings control lists them. */
|
|
50
|
+
export const SIDEBAR_STYLES = ['classic', 'modern'] as const;
|
|
51
|
+
|
|
52
|
+
/** A stored value written by another build is not a style this one can draw. */
|
|
53
|
+
export function isSidebarStyle(value: unknown): value is SidebarStyle {
|
|
54
|
+
return value === 'classic' || value === 'modern';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The style to APPLY for a stored value. Anything this build cannot draw — a
|
|
59
|
+
* value from a newer build, a corrupted blob, `undefined` on a fresh install —
|
|
60
|
+
* resolves to the default rather than to a renderer that does not exist.
|
|
61
|
+
*/
|
|
62
|
+
export function resolveSidebarStyle(value: unknown): SidebarStyle {
|
|
63
|
+
return isSidebarStyle(value) ? value : DEFAULT_SIDEBAR_STYLE;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface SidebarStyleCopy {
|
|
67
|
+
/** Card title. */
|
|
68
|
+
label: string;
|
|
69
|
+
/** One line under the title. */
|
|
70
|
+
description: string;
|
|
71
|
+
/** What the card's miniature is labelled, so the drawing is not the only cue. */
|
|
72
|
+
caption: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const SIDEBAR_STYLE_COPY: Record<SidebarStyle, SidebarStyleCopy> = {
|
|
76
|
+
classic: {
|
|
77
|
+
label: 'Classic',
|
|
78
|
+
description: 'A toolbar of boxed icons and compact rows — the layout Kabmo has always shipped.',
|
|
79
|
+
caption: 'Toolbar · 24px rows',
|
|
80
|
+
},
|
|
81
|
+
modern: {
|
|
82
|
+
label: 'Modern',
|
|
83
|
+
description: 'Permanent search, filter chips, sticky workspace headers and taller rows with one trailing column.',
|
|
84
|
+
caption: 'Search · chips · 30px rows',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -207,6 +207,12 @@ export interface ExtensionUiDialogRequest {
|
|
|
207
207
|
placeholder?: string;
|
|
208
208
|
prefill?: string;
|
|
209
209
|
timeout?: number;
|
|
210
|
+
/**
|
|
211
|
+
* Mask what is typed. omp 18.14.0 added it to `ctx.ui.input({ secret: true })`
|
|
212
|
+
* and forwards it on this frame; a client that ignores it draws a password as
|
|
213
|
+
* plain text. Present only on `method: "input"`.
|
|
214
|
+
*/
|
|
215
|
+
secret?: boolean;
|
|
210
216
|
/**
|
|
211
217
|
* Present only on the GROUPED `ask` request, which omp sends after
|
|
212
218
|
* `set_ask_dialog {enabled:true}`: every question of one `ask` tool call in a
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ThemeId } from '@/shared/lib/theme/catalog';
|
|
2
2
|
import type { ChatWidthMode } from '@/shared/lib/chat/timeline/width-mode';
|
|
3
|
+
import type { ToolRenderMode } from '@/shared/lib/chat/timeline/tool-render-mode';
|
|
4
|
+
import type { SidebarStyle } from '@/shared/lib/workspace/sidebar-style';
|
|
5
|
+
import type { ComposerStyle } from '@/shared/lib/chat/composer/style';
|
|
3
6
|
|
|
4
7
|
/** Wire protocol for the live agent event stream (chat timeline). */
|
|
5
8
|
export type SettingsCategoryId =
|
|
@@ -95,6 +98,34 @@ export interface SettingsState {
|
|
|
95
98
|
* would send every new chat back to the default.
|
|
96
99
|
*/
|
|
97
100
|
chatWidthMode: ChatWidthMode;
|
|
101
|
+
/**
|
|
102
|
+
* How a tool call is drawn in the transcript (`card` | `compact` | `trace` |
|
|
103
|
+
* `minimal`). A reading style: every mode renders the same call, facts and
|
|
104
|
+
* body — only the frame, density and grouping change. Global, like the chat
|
|
105
|
+
* width, because density is a property of the person and the display.
|
|
106
|
+
*/
|
|
107
|
+
toolRenderStyle: ToolRenderMode;
|
|
108
|
+
/**
|
|
109
|
+
* Which chrome the session sidebar draws (`classic` | `modern`). A
|
|
110
|
+
* PRESENTATION choice over one data source, not a second sidebar: both styles
|
|
111
|
+
* render the same folders, rows, actions and dialogs.
|
|
112
|
+
*
|
|
113
|
+
* Global and shared by desktop and phone, like the chat width and the tool
|
|
114
|
+
* style — the shape of a list is a property of the person and the display.
|
|
115
|
+
* `classic` is the default so an upgrade rearranges nothing.
|
|
116
|
+
*/
|
|
117
|
+
sidebarStyle: SidebarStyle;
|
|
118
|
+
/**
|
|
119
|
+
* How the chat composer is drawn (`classic` | `calm` | `console` | `stage`).
|
|
120
|
+
* A PRESENTATION choice over one composer: every style renders the same
|
|
121
|
+
* controls — attachments, plan/goal, access, model, thinking, voice, stop,
|
|
122
|
+
* send, the `@`/`/` picker — and only their ORDER and frame change. The
|
|
123
|
+
* table lives in `shared/lib/chat/composer/style.ts`.
|
|
124
|
+
*
|
|
125
|
+
* Global and shared by desktop and phone, like the chat width and the tool
|
|
126
|
+
* style. `classic` is the default so an upgrade rearranges nothing.
|
|
127
|
+
*/
|
|
128
|
+
composerStyle: ComposerStyle;
|
|
98
129
|
followUpBehavior: 'queue' | 'steering';
|
|
99
130
|
keybindingSend: 'Enter' | 'Shift + Enter' | 'Ctrl / Cmd + Enter';
|
|
100
131
|
keybindingNewLine: 'Enter' | 'Shift + Enter' | 'Ctrl / Cmd + Enter';
|