@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "@oh-my-pi/pi-coding-agent 10 tabs /
|
|
2
|
+
"source": "@oh-my-pi/pi-coding-agent 10 tabs / 574 settings",
|
|
3
3
|
"tabs": [
|
|
4
4
|
{
|
|
5
5
|
"id": "appearance",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"tab": "interaction",
|
|
157
157
|
"group": "Startup & Updates",
|
|
158
158
|
"label": "Auto Resume",
|
|
159
|
-
"description": "Automatically resume the most recent session in the current directory"
|
|
159
|
+
"description": "Automatically resume the most recent session in the current directory. If its model cannot be restored and model fallback is disabled, interactive startup warns and starts a new session without the saved history"
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
"git.enabled": {
|
|
@@ -569,8 +569,9 @@
|
|
|
569
569
|
},
|
|
570
570
|
"tui.autoGraph": {
|
|
571
571
|
"type": "enum",
|
|
572
|
-
"default": "
|
|
572
|
+
"default": "auto",
|
|
573
573
|
"values": [
|
|
574
|
+
"auto",
|
|
574
575
|
"smart",
|
|
575
576
|
"always",
|
|
576
577
|
"off"
|
|
@@ -581,6 +582,11 @@
|
|
|
581
582
|
"label": "Auto-Graph Tables",
|
|
582
583
|
"description": "Draw a chart under numeric tables in the agent's answers, in your theme's colors, on terminals that show graphics",
|
|
583
584
|
"options": [
|
|
585
|
+
{
|
|
586
|
+
"value": "auto",
|
|
587
|
+
"label": "Auto",
|
|
588
|
+
"description": "Smart when the judge role resolves to a native TypeSafe jev model, else Always"
|
|
589
|
+
},
|
|
584
590
|
{
|
|
585
591
|
"value": "smart",
|
|
586
592
|
"label": "Smart",
|
|
@@ -689,7 +695,7 @@
|
|
|
689
695
|
"tab": "appearance",
|
|
690
696
|
"group": "Display",
|
|
691
697
|
"label": "Mouse Click-to-Focus",
|
|
692
|
-
"description": "Capture mouse clicks in the main session so live subagent cards and HUD rows focus on click, with a hover highlight on the target. Native text selection becomes Shift+drag and wheel scroll becomes Shift+wheel while on"
|
|
698
|
+
"description": "Capture mouse clicks in the main session so live subagent cards and HUD rows focus on click, with a hover highlight on the target, and clicks on extension-owned links reach their extension (the link-hint key picks them without the mouse). Native text selection becomes Shift+drag and wheel scroll becomes Shift+wheel while on"
|
|
693
699
|
}
|
|
694
700
|
},
|
|
695
701
|
"tui.tight": {
|
|
@@ -826,6 +832,39 @@
|
|
|
826
832
|
"description": "Show a divider after an assistant turn whose request lost (missed) the prompt cache"
|
|
827
833
|
}
|
|
828
834
|
},
|
|
835
|
+
"display.advisorCollapsedLines": {
|
|
836
|
+
"type": "number",
|
|
837
|
+
"default": 0,
|
|
838
|
+
"ui": {
|
|
839
|
+
"tab": "appearance",
|
|
840
|
+
"group": "Display",
|
|
841
|
+
"label": "Advisor Collapsed Lines",
|
|
842
|
+
"description": "Maximum note lines a collapsed advisor card shows below its header (0 keeps the full preview; expand with the tool-output toggle)",
|
|
843
|
+
"options": [
|
|
844
|
+
{
|
|
845
|
+
"value": "0",
|
|
846
|
+
"label": "No limit",
|
|
847
|
+
"description": "Default."
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"value": "1",
|
|
851
|
+
"label": "1 line"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"value": "2",
|
|
855
|
+
"label": "2 lines"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"value": "3",
|
|
859
|
+
"label": "3 lines"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"value": "5",
|
|
863
|
+
"label": "5 lines"
|
|
864
|
+
}
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
},
|
|
829
868
|
"display.collapseCompacted": {
|
|
830
869
|
"type": "boolean",
|
|
831
870
|
"default": true,
|
|
@@ -1511,6 +1550,32 @@
|
|
|
1511
1550
|
]
|
|
1512
1551
|
}
|
|
1513
1552
|
},
|
|
1553
|
+
"session.worktreeScope": {
|
|
1554
|
+
"type": "enum",
|
|
1555
|
+
"default": "repo",
|
|
1556
|
+
"values": [
|
|
1557
|
+
"directory",
|
|
1558
|
+
"repo"
|
|
1559
|
+
],
|
|
1560
|
+
"ui": {
|
|
1561
|
+
"tab": "interaction",
|
|
1562
|
+
"group": "Startup & Updates",
|
|
1563
|
+
"label": "Resume Worktree Scope",
|
|
1564
|
+
"description": "Choose whether the resume picker's current folder includes sessions from other repository worktrees",
|
|
1565
|
+
"options": [
|
|
1566
|
+
{
|
|
1567
|
+
"value": "directory",
|
|
1568
|
+
"label": "This Directory",
|
|
1569
|
+
"description": "Only sessions saved for this directory"
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
"value": "repo",
|
|
1573
|
+
"label": "Repository Worktrees",
|
|
1574
|
+
"description": "Also include sessions from sibling worktrees"
|
|
1575
|
+
}
|
|
1576
|
+
]
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1514
1579
|
"power.sleepPrevention": {
|
|
1515
1580
|
"type": "enum",
|
|
1516
1581
|
"default": "idle",
|
|
@@ -1559,6 +1624,26 @@
|
|
|
1559
1624
|
"description": "Start on the active model, then switch to a fast/cheap model (default the 'smol' role) at the first edit/write after the plan nudge's todo list exists — the strong model plans, commits the todos, and starts the implementation before handing off. Overridable per session with --prewalk / --no-prewalk."
|
|
1560
1625
|
}
|
|
1561
1626
|
},
|
|
1627
|
+
"prewalk.from": {
|
|
1628
|
+
"type": "string",
|
|
1629
|
+
"default": "@default",
|
|
1630
|
+
"ui": {
|
|
1631
|
+
"tab": "model",
|
|
1632
|
+
"group": "Prewalk",
|
|
1633
|
+
"label": "Prewalk planning model",
|
|
1634
|
+
"description": "Model or role (default '@default') that /prewalk restart returns to for planning."
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
"prewalk.into": {
|
|
1638
|
+
"type": "string",
|
|
1639
|
+
"default": "@smol",
|
|
1640
|
+
"ui": {
|
|
1641
|
+
"tab": "model",
|
|
1642
|
+
"group": "Prewalk",
|
|
1643
|
+
"label": "Prewalk target",
|
|
1644
|
+
"description": "Model or role (default '@smol') that prewalk hands off to at the first edit/write: /prewalk, /prewalk restart, Enable Prewalk, and --prewalk. Auto-prewalk uses its own target."
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1562
1647
|
"prewalk.auto": {
|
|
1563
1648
|
"type": "enum",
|
|
1564
1649
|
"default": "off",
|
|
@@ -2488,6 +2573,16 @@
|
|
|
2488
2573
|
]
|
|
2489
2574
|
}
|
|
2490
2575
|
},
|
|
2576
|
+
"retry.rateLimitWalksChain": {
|
|
2577
|
+
"type": "boolean",
|
|
2578
|
+
"default": false,
|
|
2579
|
+
"ui": {
|
|
2580
|
+
"tab": "model",
|
|
2581
|
+
"group": "Retry & Fallback",
|
|
2582
|
+
"label": "Rate Limit Walks Chain",
|
|
2583
|
+
"description": "On a rate limit, do not hold the retry.fallbackChains walk for a turn whose thinking is signed by the failing model. Off (the default), such a turn keeps retrying the rate-limited model until retry.maxRetries is spent before the chain is reached."
|
|
2584
|
+
}
|
|
2585
|
+
},
|
|
2491
2586
|
"retry.usageAwareFallback": {
|
|
2492
2587
|
"type": "boolean",
|
|
2493
2588
|
"default": false,
|
|
@@ -3042,7 +3137,7 @@
|
|
|
3042
3137
|
},
|
|
3043
3138
|
"providers.openaiLiveSteering": {
|
|
3044
3139
|
"type": "boolean",
|
|
3045
|
-
"default":
|
|
3140
|
+
"default": false,
|
|
3046
3141
|
"ui": {
|
|
3047
3142
|
"tab": "providers",
|
|
3048
3143
|
"group": "Protocol",
|
|
@@ -6418,6 +6513,16 @@
|
|
|
6418
6513
|
"description": "Enable the ask tool for interactive user questions"
|
|
6419
6514
|
}
|
|
6420
6515
|
},
|
|
6516
|
+
"out.enabled": {
|
|
6517
|
+
"type": "boolean",
|
|
6518
|
+
"default": true,
|
|
6519
|
+
"ui": {
|
|
6520
|
+
"tab": "tools",
|
|
6521
|
+
"group": "Available Tools",
|
|
6522
|
+
"label": "Out",
|
|
6523
|
+
"description": "Let the agent reply mid-task by writing to out://, shown like a response without ending its turn. Unset: on in the interactive TUI, off in print, RPC, and ACP"
|
|
6524
|
+
}
|
|
6525
|
+
},
|
|
6421
6526
|
"tools.intentTracing": {
|
|
6422
6527
|
"type": "boolean",
|
|
6423
6528
|
"default": true,
|
|
@@ -6594,6 +6699,16 @@
|
|
|
6594
6699
|
"description": "When xd:// Prompt Docs is Built-ins Only, inline dynamic devices whose names match these glob patterns (for example mcp__context_mode_*). Catalog Only ignores this setting."
|
|
6595
6700
|
}
|
|
6596
6701
|
},
|
|
6702
|
+
"tools.xdevNotices": {
|
|
6703
|
+
"type": "boolean",
|
|
6704
|
+
"default": true,
|
|
6705
|
+
"ui": {
|
|
6706
|
+
"tab": "tools",
|
|
6707
|
+
"group": "Discovery & MCP",
|
|
6708
|
+
"label": "xd:// Mount Notices",
|
|
6709
|
+
"description": "Show an `xd://: mounted …` notice when MCP or extension tools are mounted or unmounted. The model still learns of the change with its next prompt."
|
|
6710
|
+
}
|
|
6711
|
+
},
|
|
6597
6712
|
"dev.autoqa": {
|
|
6598
6713
|
"type": "boolean",
|
|
6599
6714
|
"default": true,
|
|
@@ -6758,7 +6873,7 @@
|
|
|
6758
6873
|
"tab": "shell",
|
|
6759
6874
|
"group": "Bash",
|
|
6760
6875
|
"label": "Git Guard",
|
|
6761
|
-
"description": "Refuse git commands that discard or move shared work in
|
|
6876
|
+
"description": "Refuse git commands that discard or move shared work in a repository's main checkout: stash, reset --hard or to another commit, and checkout/switch/restore outside a merge or rebase conflict. In a linked worktree they run, saving uncommitted changes they discard first"
|
|
6762
6877
|
}
|
|
6763
6878
|
},
|
|
6764
6879
|
"bash.patterns": {
|
|
@@ -7188,6 +7303,16 @@
|
|
|
7188
7303
|
"description": "Switch the task tool to its batch shape: one call carries { context, tasks[] } — one subagent per item, with an optional per-item agent (defaulting to the session spawn-policy agent), per-item isolation, and a required shared context prepended to every assignment. With async.enabled=true, each spawn runs as an independent background agent with the normal idle/parked lifecycle; otherwise the call blocks for merged results. Disable to restore the flat single-spawn schema."
|
|
7189
7304
|
}
|
|
7190
7305
|
},
|
|
7306
|
+
"task.file": {
|
|
7307
|
+
"type": "boolean",
|
|
7308
|
+
"default": false,
|
|
7309
|
+
"ui": {
|
|
7310
|
+
"tab": "tasks",
|
|
7311
|
+
"group": "Subagents",
|
|
7312
|
+
"label": "Task Instructions from Files",
|
|
7313
|
+
"description": "Let the task tool read subagent instructions from a file (taskFile), recording its path and SHA-256."
|
|
7314
|
+
}
|
|
7315
|
+
},
|
|
7191
7316
|
"task.structured": {
|
|
7192
7317
|
"type": "boolean",
|
|
7193
7318
|
"default": false,
|
|
@@ -7678,6 +7803,26 @@
|
|
|
7678
7803
|
"description": "Positive finite active-work timeout for extension tool_call handlers; invalid values use 30000ms, and time awaiting OMP-owned dialogs does not count"
|
|
7679
7804
|
}
|
|
7680
7805
|
},
|
|
7806
|
+
"extensionHandlers.modeControl": {
|
|
7807
|
+
"type": "boolean",
|
|
7808
|
+
"default": true,
|
|
7809
|
+
"ui": {
|
|
7810
|
+
"tab": "tools",
|
|
7811
|
+
"group": "Extensions",
|
|
7812
|
+
"label": "Extension Mode Control",
|
|
7813
|
+
"description": "Let extensions enter and exit plan, vibe, goal, and loop modes via ctx.sessionModes.set(); reading mode state stays available"
|
|
7814
|
+
}
|
|
7815
|
+
},
|
|
7816
|
+
"extensionRenderers.assistantText": {
|
|
7817
|
+
"type": "boolean",
|
|
7818
|
+
"default": false,
|
|
7819
|
+
"ui": {
|
|
7820
|
+
"tab": "tools",
|
|
7821
|
+
"group": "Extensions",
|
|
7822
|
+
"label": "Extension Reply Renderers",
|
|
7823
|
+
"description": "Let extensions change how assistant replies are drawn, redraw a reply in place, and receive clicks on their own links; the session, exports and model context keep the reply as written"
|
|
7824
|
+
}
|
|
7825
|
+
},
|
|
7681
7826
|
"exa.enabled": {
|
|
7682
7827
|
"type": "boolean",
|
|
7683
7828
|
"default": true,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The one reader/writer of the composer's style.
|
|
8
|
+
*
|
|
9
|
+
* A style picks a ROW ORDER and a frame, so something in JavaScript must
|
|
10
|
+
* re-render when it changes — `appSettings` is a boot-time prop and would only
|
|
11
|
+
* show a new style after a reload. The settings modal calls `applyComposerStyle`
|
|
12
|
+
* when the value moves, which announces `omp:composer-style-changed`;
|
|
13
|
+
* `useComposerStyle` is the single subscriber and the composer is its only
|
|
14
|
+
* consumer.
|
|
15
|
+
*
|
|
16
|
+
* The initial value comes from the primed settings snapshot
|
|
17
|
+
* (`primeKabmoSettings` in `main.tsx`), so a mounted composer draws the stored
|
|
18
|
+
* style on its first render — no flash of the other order.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { useState } from 'preact/hooks';
|
|
22
|
+
import { readKabmoSetting } from '@/shared/lib/settings/client';
|
|
23
|
+
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
24
|
+
import type { SettingsState } from '@/shared/types';
|
|
25
|
+
import {
|
|
26
|
+
resolveComposerStyle,
|
|
27
|
+
type ComposerStyle,
|
|
28
|
+
} from '@/shared/lib/chat/composer/style';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* `app_settings` key holding the style (in the `kabmo_settings` blob).
|
|
32
|
+
*
|
|
33
|
+
* `satisfies keyof SettingsState` because the key and the field name must be
|
|
34
|
+
* the same string for persistence to work at all — renaming the field without
|
|
35
|
+
* this line would leave the setting silently unsaved.
|
|
36
|
+
*/
|
|
37
|
+
export const COMPOSER_STYLE_SETTING_KEY = 'composerStyle' satisfies keyof SettingsState;
|
|
38
|
+
|
|
39
|
+
/** Window event carrying the resolved style as `detail`. */
|
|
40
|
+
export const COMPOSER_STYLE_CHANGED_EVENT = 'omp:composer-style-changed';
|
|
41
|
+
|
|
42
|
+
/** The stored style, resolved against what this build can draw. */
|
|
43
|
+
export function currentComposerStyle(appSettings?: Record<string, any>): ComposerStyle {
|
|
44
|
+
return resolveComposerStyle(readKabmoSetting<unknown>(COMPOSER_STYLE_SETTING_KEY, appSettings));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Announce a new style. Called by the settings modal when the value changes —
|
|
49
|
+
* the persisted copy is written by the modal's own `writeKabmoSettings`, so
|
|
50
|
+
* this function only has to make the mounted composer re-render.
|
|
51
|
+
*/
|
|
52
|
+
export function applyComposerStyle(style: unknown): void {
|
|
53
|
+
if (typeof window === 'undefined') return;
|
|
54
|
+
window.dispatchEvent(
|
|
55
|
+
new CustomEvent(COMPOSER_STYLE_CHANGED_EVENT, { detail: resolveComposerStyle(style) }),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The style the composer should draw, kept live across settings edits. */
|
|
60
|
+
export function useComposerStyle(): ComposerStyle {
|
|
61
|
+
const [style, setStyle] = useState<ComposerStyle>(() => currentComposerStyle());
|
|
62
|
+
useKabmoEvent(COMPOSER_STYLE_CHANGED_EVENT, (event) => {
|
|
63
|
+
setStyle(resolveComposerStyle((event as CustomEvent<unknown>).detail));
|
|
64
|
+
});
|
|
65
|
+
return style;
|
|
66
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `revealRow` — scroll a row into the middle of the viewport, mounting it if the
|
|
8
|
+
* window does not cover it yet.
|
|
9
|
+
*
|
|
10
|
+
* Split out of `row-window.ts` so that hook stays under the repo's per-file
|
|
11
|
+
* ceiling; the loop is a self-contained piece with its own timing rules, and it
|
|
12
|
+
* talks to the hook only through refs (which is what lets it keep correcting for
|
|
13
|
+
* seconds without a re-render).
|
|
14
|
+
*
|
|
15
|
+
* The landing is never a single write. The rows a jump just mounted are
|
|
16
|
+
* measured on later commits — a tool card's output arrives through a deferred
|
|
17
|
+
* highlight, an image decodes, an accordion opens — and every measurement above
|
|
18
|
+
* the target moves it. Measured here, a fixed short window left a jump to the
|
|
19
|
+
* newest turn 300 px short of the tail: outside `scroll.ts`'s 100 px follow
|
|
20
|
+
* threshold, so the stream silently stopped following after the jump.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import type { RowLayout } from '@/shared/lib/chat/timeline/row-window';
|
|
24
|
+
import { rowIndex, rowScrollOffset } from '@/shared/lib/chat/timeline/row-window';
|
|
25
|
+
|
|
26
|
+
/** How long a reveal keeps correcting after it first moves the viewport. */
|
|
27
|
+
const REVEAL_SETTLE_MS = 3000;
|
|
28
|
+
|
|
29
|
+
/** Consecutive still frames that end a reveal early — the layout has settled. */
|
|
30
|
+
const REVEAL_STILL_FRAMES = 10;
|
|
31
|
+
|
|
32
|
+
/** How long a reveal waits for a row the pager is still bringing in. */
|
|
33
|
+
const REVEAL_DEADLINE_MS = 3000;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Write a scroll position that is meant to LAND, not to animate.
|
|
37
|
+
*
|
|
38
|
+
* The timeline container carries Tailwind's `scroll-smooth`, and CSS
|
|
39
|
+
* `scroll-behavior` applies to a `scrollTop` ASSIGNMENT too (CSSOM-View:
|
|
40
|
+
* the setter scrolls with `behavior: auto`, which resolves to the element's
|
|
41
|
+
* computed `scroll-behavior`). So `el.scrollTop = target` started a smooth
|
|
42
|
+
* animation, the reveal's correction loop re-targeted it every frame, and the
|
|
43
|
+
* jump was left mid-flight wherever the loop stopped — measured on a
|
|
44
|
+
* 240-message session: the trace walked 9 804 → 6 504 px and stayed there.
|
|
45
|
+
* `behavior: 'instant'` is the one value CSS cannot override.
|
|
46
|
+
*/
|
|
47
|
+
export function writeScrollTop(el: HTMLElement, top: number): void {
|
|
48
|
+
if (Math.abs(el.scrollTop - top) <= 1) return;
|
|
49
|
+
el.scrollTo({ top, behavior: 'instant' });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface RevealRowDeps {
|
|
53
|
+
/** The timeline's scroll container, read at call time (it is swapped in late). */
|
|
54
|
+
scrollRef: { current: HTMLDivElement | null };
|
|
55
|
+
idsRef: { current: readonly string[] };
|
|
56
|
+
layoutRef: { current: RowLayout };
|
|
57
|
+
viewportRef: { current: number };
|
|
58
|
+
/** Set when the landing is the newest turn; the tail is an anchor of its own. */
|
|
59
|
+
tailPinRef: { current: boolean };
|
|
60
|
+
/** True while a reveal owns the viewport, so a measurement stands down. */
|
|
61
|
+
revealingRef: { current: boolean };
|
|
62
|
+
/** Bumped per reveal: a superseded one stops writing. */
|
|
63
|
+
generationRef: { current: number };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Build the reveal function. Every dep is a ref, so the returned function is
|
|
68
|
+
* stable for the life of the hook and never re-creates the loop mid-flight.
|
|
69
|
+
*/
|
|
70
|
+
export function createRevealRow(deps: RevealRowDeps): (id: string) => Promise<void> {
|
|
71
|
+
return (id: string): Promise<void> => {
|
|
72
|
+
const el = deps.scrollRef.current;
|
|
73
|
+
if (!el) return Promise.resolve();
|
|
74
|
+
const deadline = Date.now() + REVEAL_DEADLINE_MS;
|
|
75
|
+
const settleBy = Date.now() + REVEAL_SETTLE_MS;
|
|
76
|
+
// Supersedes an earlier reveal: two rail clicks in a row must land on the
|
|
77
|
+
// SECOND turn, not race each other to the first one's position.
|
|
78
|
+
const generation = (deps.generationRef.current += 1);
|
|
79
|
+
deps.revealingRef.current = true;
|
|
80
|
+
const { promise, resolve } = Promise.withResolvers<void>();
|
|
81
|
+
let stillFrames = 0;
|
|
82
|
+
let lastTop = -1;
|
|
83
|
+
const finish = (): void => {
|
|
84
|
+
// Only the reveal that still owns the generation clears the flag: a
|
|
85
|
+
// superseded one must not hand the viewport to a correction while its
|
|
86
|
+
// successor is still flying.
|
|
87
|
+
if (generation === deps.generationRef.current) deps.revealingRef.current = false;
|
|
88
|
+
resolve();
|
|
89
|
+
};
|
|
90
|
+
const step = (): void => {
|
|
91
|
+
if (generation !== deps.generationRef.current) {
|
|
92
|
+
finish();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const rows = deps.idsRef.current;
|
|
96
|
+
const index = rowIndex(rows, id);
|
|
97
|
+
if (index < 0) {
|
|
98
|
+
// The pager may still be bringing the row in; keep asking until the
|
|
99
|
+
// deadline rather than scrolling to a row that does not exist yet.
|
|
100
|
+
if (Date.now() < deadline) requestAnimationFrame(step);
|
|
101
|
+
else finish();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const current = deps.layoutRef.current;
|
|
105
|
+
const view = el.clientHeight || deps.viewportRef.current;
|
|
106
|
+
// The newest turn is the TAIL, not the centre of the last row: that is
|
|
107
|
+
// what the reader means by jumping there, and it is what lets follow mode
|
|
108
|
+
// re-engage (the scroll handler's threshold is 100 px).
|
|
109
|
+
deps.tailPinRef.current = index === rows.length - 1;
|
|
110
|
+
writeScrollTop(
|
|
111
|
+
el,
|
|
112
|
+
deps.tailPinRef.current
|
|
113
|
+
? Math.max(0, el.scrollHeight - view)
|
|
114
|
+
: rowScrollOffset(current, index, view),
|
|
115
|
+
);
|
|
116
|
+
// A row that was just mounted is measured on a later commit; the
|
|
117
|
+
// corrections land on the MEASURED position rather than the estimate the
|
|
118
|
+
// first write used.
|
|
119
|
+
stillFrames = Math.abs(el.scrollTop - lastTop) <= 1 ? stillFrames + 1 : 0;
|
|
120
|
+
lastTop = el.scrollTop;
|
|
121
|
+
if (stillFrames >= REVEAL_STILL_FRAMES || Date.now() >= settleBy) {
|
|
122
|
+
finish();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
requestAnimationFrame(step);
|
|
126
|
+
};
|
|
127
|
+
requestAnimationFrame(step);
|
|
128
|
+
return promise;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
@@ -208,4 +208,39 @@ describe('useTimelineRowWindow', () => {
|
|
|
208
208
|
|
|
209
209
|
expect(scroller.scrollTop).toBe(soloTop);
|
|
210
210
|
});
|
|
211
|
+
|
|
212
|
+
test('a row growing above the viewport keeps the mounted window and the reader', async () => {
|
|
213
|
+
// An expanded thinking block grows the row it sits in. The correction has
|
|
214
|
+
// to land in the SAME commit as the measurement: a deferred restore runs
|
|
215
|
+
// with the pre-measurement layout, so the next commit has no anchor left,
|
|
216
|
+
// the window re-derives from a stale `scrollTop`, and the rows at its edge
|
|
217
|
+
// unmount — measured in the browser as three rows removed and re-added per
|
|
218
|
+
// expand, which throws away every block's local state (an expanded thought
|
|
219
|
+
// snapping shut).
|
|
220
|
+
const scroller = installScroller(20_000);
|
|
221
|
+
const heights = new Map<string, number>();
|
|
222
|
+
for (let i = 0; i < ROWS; i += 1) {
|
|
223
|
+
const node = document.createElement('div');
|
|
224
|
+
node.dataset.rowId = `r-${i}`;
|
|
225
|
+
node.getBoundingClientRect = () => ({ height: heights.get(node.dataset.rowId!) ?? ROW_HEIGHT }) as DOMRect;
|
|
226
|
+
scroller.appendChild(node);
|
|
227
|
+
}
|
|
228
|
+
await mount(scroller);
|
|
229
|
+
await act(async () => {});
|
|
230
|
+
const opened = rowWindow!.start;
|
|
231
|
+
const before = scroller.scrollTop;
|
|
232
|
+
expect(opened).toBeGreaterThan(0);
|
|
233
|
+
|
|
234
|
+
heights.set('r-50', ROW_HEIGHT + 1_000);
|
|
235
|
+
// What the timeline does on the click: a re-render, then the measure
|
|
236
|
+
// effect adopts the grown row.
|
|
237
|
+
await act(async () => { render(h(Probe, { node: scroller }), container); });
|
|
238
|
+
drainFrames();
|
|
239
|
+
await act(async () => {});
|
|
240
|
+
|
|
241
|
+
expect(rowWindow!.start).toBe(opened);
|
|
242
|
+
// The row the reader was on kept its place: the 1 000 px that appeared
|
|
243
|
+
// above it moved the offset by exactly that much.
|
|
244
|
+
expect(scroller.scrollTop).toBe(before + 1_000);
|
|
245
|
+
});
|
|
211
246
|
});
|