@vibe-forge/client 0.11.2 → 1.0.0

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.
Files changed (232) hide show
  1. package/cli.cjs +6 -11
  2. package/dist/assets/{arc-De_WjPJ3.js → arc-CbOXL0l9.js} +1 -1
  3. package/dist/assets/{blockDiagram-c4efeb88-C4aR2zTE.js → blockDiagram-c4efeb88-CqxINvsS.js} +1 -1
  4. package/dist/assets/{c4Diagram-c83219d4-BZH3rq_m.js → c4Diagram-c83219d4-BKazU0hb.js} +1 -1
  5. package/dist/assets/channel-Dnopc5A6.js +1 -0
  6. package/dist/assets/{classDiagram-beda092f-BzJgBrIK.js → classDiagram-beda092f-fAFX5BpB.js} +1 -1
  7. package/dist/assets/{classDiagram-v2-2358418a-5ZtXcnT3.js → classDiagram-v2-2358418a-w1VkNGJj.js} +1 -1
  8. package/dist/assets/clone-sQthahUA.js +1 -0
  9. package/dist/assets/{createText-1719965b-DUVvEtmR.js → createText-1719965b-CEinakVP.js} +1 -1
  10. package/dist/assets/{cssMode-GoTNjuXX.js → cssMode-DPqRki4y.js} +1 -1
  11. package/dist/assets/{edges-96097737-Dd7m4Cvs.js → edges-96097737-Cb0F1_3K.js} +1 -1
  12. package/dist/assets/{erDiagram-0228fc6a-DxqFlG_f.js → erDiagram-0228fc6a-C-N2fx-J.js} +1 -1
  13. package/dist/assets/{flowDb-c6c81e3f-DU0C5kCI.js → flowDb-c6c81e3f-D1Xz_8Gf.js} +1 -1
  14. package/dist/assets/{flowDiagram-50d868cf-Di1uDa_X.js → flowDiagram-50d868cf-DyPSZyAj.js} +1 -1
  15. package/dist/assets/flowDiagram-v2-4f6560a1-OazrdWQO.js +1 -0
  16. package/dist/assets/{flowchart-elk-definition-6af322e1-CwG8aty5.js → flowchart-elk-definition-6af322e1-Dr1DDXwE.js} +1 -1
  17. package/dist/assets/{freemarker2-j39cqTlI.js → freemarker2-C3DvPFaK.js} +1 -1
  18. package/dist/assets/{ganttDiagram-a2739b55-baO_lzL-.js → ganttDiagram-a2739b55-DmvY1GRj.js} +1 -1
  19. package/dist/assets/{gitGraphDiagram-82fe8481-COoHjYMf.js → gitGraphDiagram-82fe8481-CoXfPYYi.js} +1 -1
  20. package/dist/assets/{graph-KxESr4M5.js → graph-BkDQy7Qt.js} +1 -1
  21. package/dist/assets/{handlebars-BgjdZO8G.js → handlebars-BcTFdqjl.js} +1 -1
  22. package/dist/assets/{html-Ba7tYObe.js → html-Dg-O6XFr.js} +1 -1
  23. package/dist/assets/{htmlMode-Bztvbig1.js → htmlMode-B_wqYWvn.js} +1 -1
  24. package/dist/assets/{index-5325376f-BMTAx2mL.js → index-5325376f-kxPTR3_e.js} +1 -1
  25. package/dist/assets/index-o93dlo92.css +32 -0
  26. package/dist/assets/{index-Pm_kLJvG.js → index-wkhI4dr6.js} +350 -329
  27. package/dist/assets/{infoDiagram-8eee0895-CC74qbHY.js → infoDiagram-8eee0895-BEvqkwPI.js} +1 -1
  28. package/dist/assets/{javascript-C1e1cllX.js → javascript-DhlOH8_z.js} +1 -1
  29. package/dist/assets/{journeyDiagram-c64418c1-C4MyOdE6.js → journeyDiagram-c64418c1-gKtLYmmp.js} +1 -1
  30. package/dist/assets/{jsonMode-BC98AlvF.js → jsonMode-DxTbF9OD.js} +1 -1
  31. package/dist/assets/{layout-CxAyTlr7.js → layout-CDaZEk6E.js} +1 -1
  32. package/dist/assets/{line-DhaUfI71.js → line-DNRQu8iq.js} +1 -1
  33. package/dist/assets/{linear-MYukzldK.js → linear-Cph9Z6_j.js} +1 -1
  34. package/dist/assets/{liquid-DahfJEYl.js → liquid-ByZ6JgRG.js} +1 -1
  35. package/dist/assets/{lspLanguageFeatures-BWDJcswW.js → lspLanguageFeatures-DzvhkgnM.js} +1 -1
  36. package/dist/assets/{mdx-BELlF_FD.js → mdx-D8RGHTl6.js} +1 -1
  37. package/dist/assets/{mermaid.core-BrQnSGSY.js → mermaid.core-BgcryF__.js} +4 -4
  38. package/dist/assets/{mindmap-definition-8da855dc-B0FoxTiy.js → mindmap-definition-8da855dc-WrxK0FcB.js} +1 -1
  39. package/dist/assets/{pieDiagram-a8764435-Ddr2cjSL.js → pieDiagram-a8764435-VsZBsiQy.js} +1 -1
  40. package/dist/assets/{python--C9if_AD.js → python-CXVtk_cg.js} +1 -1
  41. package/dist/assets/{quadrantDiagram-1e28029f-BlEs7Mrl.js → quadrantDiagram-1e28029f-BVlgwOvU.js} +1 -1
  42. package/dist/assets/{razor-B9U9JxKn.js → razor-0tind7h2.js} +1 -1
  43. package/dist/assets/{requirementDiagram-08caed73-kEFOAu2v.js → requirementDiagram-08caed73-CpPMPoYp.js} +1 -1
  44. package/dist/assets/{sankeyDiagram-a04cb91d-BBghez8I.js → sankeyDiagram-a04cb91d-Cm5nnRmc.js} +1 -1
  45. package/dist/assets/{sequenceDiagram-c5b8d532-CJqgzdUE.js → sequenceDiagram-c5b8d532-DpMlJvJB.js} +1 -1
  46. package/dist/assets/{stateDiagram-1ecb1508-BER4XEI6.js → stateDiagram-1ecb1508-DU1zc7vq.js} +1 -1
  47. package/dist/assets/{stateDiagram-v2-c2b004d7-EBV2vSks.js → stateDiagram-v2-c2b004d7-D-0RgmAp.js} +1 -1
  48. package/dist/assets/{styles-b4e223ce-k0eswZsE.js → styles-b4e223ce-BSO-yNWV.js} +1 -1
  49. package/dist/assets/{styles-ca3715f6-Ckr7GA-0.js → styles-ca3715f6-CHnsn2Ro.js} +1 -1
  50. package/dist/assets/{styles-d45a18b0-C1bpSwV3.js → styles-d45a18b0-B-rVGjEq.js} +1 -1
  51. package/dist/assets/{svgDrawCommon-b86b1483-CDtKpGvy.js → svgDrawCommon-b86b1483-CA3Pl89f.js} +1 -1
  52. package/dist/assets/{timeline-definition-faaaa080-BeGR-vua.js → timeline-definition-faaaa080-BcihLR6s.js} +1 -1
  53. package/dist/assets/{tsMode-D_gJXIy3.js → tsMode-D9GGa5Ur.js} +1 -1
  54. package/dist/assets/{typescript-BoKcNXkN.js → typescript-BT9CK_EL.js} +1 -1
  55. package/dist/assets/{xml-DZvURlJ-.js → xml-DNO75J-T.js} +1 -1
  56. package/dist/assets/{xychartDiagram-f5964ef8-DxfeLuYV.js → xychartDiagram-f5964ef8-DJTwe32X.js} +1 -1
  57. package/dist/assets/{yaml-CTC8PAGY.js → yaml-7CVzhiP2.js} +1 -1
  58. package/dist/index.html +2 -2
  59. package/package.json +13 -10
  60. package/src/api/git.ts +12 -0
  61. package/src/api/sessions.ts +131 -4
  62. package/src/api/types.ts +2 -1
  63. package/src/api.ts +13 -0
  64. package/src/components/ArchiveView.scss +143 -54
  65. package/src/components/ArchiveView.tsx +181 -167
  66. package/src/components/CodeBlock.scss +5 -0
  67. package/src/components/ConfigView.scss +142 -31
  68. package/src/components/ConfigView.tsx +161 -86
  69. package/src/components/MarkdownContent.tsx +7 -0
  70. package/src/components/NavRail.scss +248 -0
  71. package/src/components/NavRail.tsx +80 -107
  72. package/src/components/NavRailCompact.tsx +107 -0
  73. package/src/components/NavRailCompactMoreSheet.tsx +141 -0
  74. package/src/components/ShortcutTooltip.tsx +4 -2
  75. package/src/components/Sidebar.scss +51 -0
  76. package/src/components/Sidebar.tsx +43 -16
  77. package/src/components/automation-view/RuleFormPanel.scss +40 -13
  78. package/src/components/automation-view/RuleSidebar.scss +73 -47
  79. package/src/components/automation-view/RuleSidebar.tsx +9 -13
  80. package/src/components/automation-view/RunHistoryPanel.scss +141 -13
  81. package/src/components/automation-view/RunHistoryPanel.tsx +203 -161
  82. package/src/components/automation-view/TaskList.scss +44 -13
  83. package/src/components/automation-view/TriggerList.scss +46 -14
  84. package/src/components/automation-view/index.scss +82 -10
  85. package/src/components/automation-view/index.tsx +108 -55
  86. package/src/components/benchmark-view/BenchmarkCasePanel.scss +36 -16
  87. package/src/components/benchmark-view/BenchmarkSidebar.scss +44 -22
  88. package/src/components/benchmark-view/BenchmarkSidebar.tsx +0 -6
  89. package/src/components/benchmark-view/BenchmarkView.scss +63 -20
  90. package/src/components/benchmark-view/index.tsx +71 -34
  91. package/src/components/chat/AGENTS.md +14 -2
  92. package/src/components/chat/ChatComposerCard.scss +77 -0
  93. package/src/components/chat/ChatComposerCard.tsx +59 -0
  94. package/src/components/chat/ChatHeader.scss +187 -0
  95. package/src/components/chat/ChatHeader.tsx +209 -57
  96. package/src/components/chat/ChatHistoryView.tsx +279 -52
  97. package/src/components/chat/ChatTimelineView.scss +94 -1
  98. package/src/components/chat/ChatTimelineView.tsx +42 -0
  99. package/src/components/chat/CurrentTodoList.scss +210 -200
  100. package/src/components/chat/CurrentTodoList.tsx +116 -48
  101. package/src/components/chat/NewSessionGuide.scss +139 -1
  102. package/src/components/chat/NewSessionGuide.tsx +57 -100
  103. package/src/components/chat/NewSessionGuideCompactPanel.tsx +130 -0
  104. package/src/components/chat/NewSessionGuideGrid.tsx +141 -0
  105. package/src/components/chat/QueuedMessagesCard.scss +195 -0
  106. package/src/components/chat/QueuedMessagesCard.tsx +170 -0
  107. package/src/components/chat/git-controls/BranchSwitcherDropdown.tsx +61 -56
  108. package/src/components/chat/git-controls/BranchSwitcherResults.tsx +167 -0
  109. package/src/components/chat/git-controls/BranchTreeEntries.tsx +99 -0
  110. package/src/components/chat/git-controls/ChatGitControls.scss +437 -5
  111. package/src/components/chat/git-controls/ChatGitControls.tsx +136 -109
  112. package/src/components/chat/git-controls/DraftGitControls.tsx +91 -0
  113. package/src/components/chat/git-controls/GitOperationsDropdown.tsx +10 -2
  114. package/src/components/chat/git-controls/GitWorktreeDropdown.tsx +301 -28
  115. package/src/components/chat/git-controls/git-branch-tree.ts +148 -0
  116. package/src/components/chat/git-controls/use-chat-draft-git-controls.ts +168 -0
  117. package/src/components/chat/git-controls/use-chat-git-controls.ts +76 -3
  118. package/src/components/chat/messages/MessageContextMenu.tsx +3 -1
  119. package/src/components/chat/messages/MessageItem.scss +78 -4
  120. package/src/components/chat/messages/MessageItem.tsx +47 -3
  121. package/src/components/chat/sender/@components/adapter-select/AdapterSelectControl.scss +23 -0
  122. package/src/components/chat/sender/@components/reference-actions/ReferenceActionsControl.scss +17 -0
  123. package/src/components/chat/sender/@components/reference-actions/ReferencePermissionActionsPopover.tsx +4 -1
  124. package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.scss +167 -30
  125. package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.tsx +95 -23
  126. package/src/components/chat/sender/@components/sender-body/SenderBody.tsx +10 -0
  127. package/src/components/chat/sender/@components/sender-interaction-panel/SenderInteractionPanel.scss +161 -45
  128. package/src/components/chat/sender/@components/sender-interaction-panel/SenderInteractionPanel.tsx +310 -71
  129. package/src/components/chat/sender/@components/sender-monaco-editor/SenderMonacoEditor.tsx +18 -0
  130. package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-editor.ts +86 -9
  131. package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-theme.ts +52 -3
  132. package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.scss +110 -1
  133. package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.tsx +137 -17
  134. package/src/components/chat/sender/@components/sender-toolbar/SenderSelectBase.scss +21 -0
  135. package/src/components/chat/sender/@components/sender-toolbar/SenderSelectShared.scss +21 -0
  136. package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.scss +63 -0
  137. package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.tsx +12 -6
  138. package/src/components/chat/sender/@core/build-sender-controller-result.ts +6 -0
  139. package/src/components/chat/sender/@core/build-sender-toolbar.ts +25 -2
  140. package/src/components/chat/sender/@core/create-sender-toolbar-handlers.ts +9 -2
  141. package/src/components/chat/sender/@core/get-sender-runtime-state.ts +1 -1
  142. package/src/components/chat/sender/@core/interaction-request.ts +2 -2
  143. package/src/components/chat/sender/@core/sender-toolbar-bindings.ts +28 -4
  144. package/src/components/chat/sender/@hooks/use-model-select-browser.tsx +4 -2
  145. package/src/components/chat/sender/@hooks/use-sender-controller.ts +56 -11
  146. package/src/components/chat/sender/@hooks/use-sender-keydown.ts +64 -0
  147. package/src/components/chat/sender/@hooks/use-sender-shortcuts.ts +16 -1
  148. package/src/components/chat/sender/@hooks/use-sender-submit.ts +16 -8
  149. package/src/components/chat/sender/@types/sender-props.ts +20 -3
  150. package/src/components/chat/sender/@types/sender-toolbar-types.ts +12 -1
  151. package/src/components/chat/sender/Sender.scss +4 -1
  152. package/src/components/chat/sender/Sender.tsx +3 -12
  153. package/src/components/chat/session-timeline-panel/EventList.scss +88 -0
  154. package/src/components/chat/session-timeline-panel/EventList.tsx +99 -47
  155. package/src/components/chat/session-timeline-panel/gantt.ts +23 -7
  156. package/src/components/chat/session-timeline-panel/git-graph.ts +6 -1
  157. package/src/components/chat/session-timeline-panel/index.scss +14 -1
  158. package/src/components/chat/session-timeline-panel/index.tsx +86 -10
  159. package/src/components/chat/session-timeline-panel/types.ts +4 -0
  160. package/src/components/chat/status-bar/ChatStatusBar.scss +27 -0
  161. package/src/components/chat/status-bar/ChatStatusBar.tsx +39 -0
  162. package/src/components/chat/terminal/ChatTerminalView.tsx +6 -0
  163. package/src/components/chat/tools/core/ToolCallBox.scss +19 -0
  164. package/src/components/chat/tools/core/ToolGroup.scss +32 -0
  165. package/src/components/chat/tools/task/components/TaskToolCard.scss +59 -1
  166. package/src/components/config/ConfigEditors.scss +20 -6
  167. package/src/components/config/ConfigFieldRow.scss +57 -17
  168. package/src/components/config/ConfigSectionForm.scss +10 -4
  169. package/src/components/config/ConfigSectionPanel.tsx +18 -11
  170. package/src/components/config/configSchema.ts +1 -0
  171. package/src/components/config/record-editors/RecordEditors.scss +42 -9
  172. package/src/components/dock-panel/DockPanel.scss +6 -2
  173. package/src/components/dock-panel/DockPanel.tsx +12 -16
  174. package/src/components/knowledge-base/KnowledgeBaseView.scss +180 -6
  175. package/src/components/knowledge-base/KnowledgeBaseView.tsx +98 -26
  176. package/src/components/knowledge-base/components/ActionButton.scss +4 -0
  177. package/src/components/knowledge-base/components/EmptyState.scss +5 -8
  178. package/src/components/knowledge-base/components/EntitiesTab.tsx +8 -2
  179. package/src/components/knowledge-base/components/EntityItem.scss +10 -3
  180. package/src/components/knowledge-base/components/FilterBar.scss +13 -2
  181. package/src/components/knowledge-base/components/FlowsTab.tsx +8 -2
  182. package/src/components/knowledge-base/components/KnowledgeBaseHeader.scss +2 -23
  183. package/src/components/knowledge-base/components/KnowledgeBaseHeader.tsx +0 -5
  184. package/src/components/knowledge-base/components/KnowledgeList.scss +15 -6
  185. package/src/components/knowledge-base/components/LoadingState.scss +4 -0
  186. package/src/components/knowledge-base/components/RuleItem.scss +86 -0
  187. package/src/components/knowledge-base/components/RuleItem.tsx +2 -0
  188. package/src/components/knowledge-base/components/RulesTab.tsx +8 -2
  189. package/src/components/knowledge-base/components/SectionHeader.scss +3 -18
  190. package/src/components/knowledge-base/components/SectionHeader.tsx +3 -7
  191. package/src/components/knowledge-base/components/SkillsTab.tsx +8 -3
  192. package/src/components/knowledge-base/components/SpecItem.scss +16 -7
  193. package/src/components/layout/@hooks/use-mobile-sidebar-modal.ts +190 -0
  194. package/src/components/layout/AppShell.scss +106 -6
  195. package/src/components/layout/AppShell.tsx +118 -10
  196. package/src/components/layout/PageShell.scss +41 -0
  197. package/src/components/layout/PageShell.tsx +32 -0
  198. package/src/components/layout/mobile-sidebar-constants.ts +1 -0
  199. package/src/components/nav-rail-compact-config.ts +114 -0
  200. package/src/components/nav-rail-items.tsx +181 -0
  201. package/src/components/sidebar/SessionContextMenu.tsx +3 -1
  202. package/src/components/sidebar/SessionItem.scss +62 -0
  203. package/src/components/sidebar/SessionItem.tsx +97 -52
  204. package/src/components/sidebar/SessionList.tsx +6 -0
  205. package/src/components/sidebar/SidebarHeader.scss +49 -0
  206. package/src/components/sidebar/SidebarHeader.tsx +27 -5
  207. package/src/components/sidebar/SidebarHeaderBatchActions.tsx +8 -4
  208. package/src/components/sidebar/SidebarHeaderSearchActions.tsx +6 -3
  209. package/src/components/sidebar/SidebarUtilityFooter.tsx +69 -0
  210. package/src/components/workspace/ContextFilePicker.tsx +12 -4
  211. package/src/hooks/chat/chat-session-workspace-draft.ts +25 -0
  212. package/src/hooks/chat/session-view-cache.ts +4 -1
  213. package/src/hooks/chat/use-chat-adapter.ts +5 -1
  214. package/src/hooks/chat/use-chat-model-adapter-selection.tsx +5 -1
  215. package/src/hooks/chat/use-chat-scroll.ts +24 -7
  216. package/src/hooks/chat/use-chat-session-actions.ts +118 -6
  217. package/src/hooks/chat/use-chat-session-messages.ts +20 -1
  218. package/src/hooks/chat/use-chat-session.ts +2 -0
  219. package/src/hooks/use-responsive-layout.ts +115 -0
  220. package/src/main.tsx +8 -0
  221. package/src/resources/adapters.ts +15 -0
  222. package/src/resources/locales/en.json +84 -1
  223. package/src/resources/locales/zh.json +84 -1
  224. package/src/routes/ChatRoute.scss +152 -9
  225. package/src/routes/ChatRoute.tsx +31 -34
  226. package/src/store/index.ts +2 -0
  227. package/dist/assets/channel-BvERb8WU.js +0 -1
  228. package/dist/assets/clone-B9_0v-6Y.js +0 -1
  229. package/dist/assets/flowDiagram-v2-4f6560a1-LpS8Kb00.js +0 -1
  230. package/dist/assets/index-C1oh0w9H.css +0 -32
  231. package/src/components/chat/ThinkingStatus.scss +0 -70
  232. package/src/components/chat/ThinkingStatus.tsx +0 -13
@@ -1,17 +1,26 @@
1
1
  .knowledge-base-view__list {
2
- border: 1px solid var(--border-color);
3
- border-radius: 12px;
4
- overflow: hidden;
5
- background: var(--bg-color);
2
+ background: transparent;
3
+ }
4
+
5
+ .knowledge-base-view__list .ant-list-items {
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 6px;
6
9
  }
7
10
 
8
11
  .knowledge-base-view__list .ant-list-item {
9
12
  padding: 0;
10
13
  align-items: stretch;
14
+ border: 1px solid var(--border-color);
15
+ border-radius: 8px;
16
+ background: var(--bg-color);
17
+ overflow: hidden;
18
+ transition: border-color .2s ease, background-color .2s ease;
11
19
  }
12
20
 
13
- .knowledge-base-view__list .ant-list-item + .ant-list-item {
14
- border-top: 1px solid var(--border-color);
21
+ .knowledge-base-view__list .ant-list-item:hover {
22
+ border-color: var(--subpage-tertiary-hover-border);
23
+ background: var(--subpage-tertiary-hover-bg);
15
24
  }
16
25
 
17
26
  .knowledge-base-view__list-item {
@@ -2,4 +2,8 @@
2
2
  padding: 24px;
3
3
  display: grid;
4
4
  place-items: center;
5
+ min-height: 120px;
6
+ border-radius: 8px;
7
+ border: 1px dashed var(--border-color);
8
+ background: var(--sub-bg-color);
5
9
  }
@@ -0,0 +1,86 @@
1
+ .knowledge-base-view__item {
2
+ width: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 10px;
6
+ padding: var(--subpage-tertiary-padding);
7
+ }
8
+
9
+ .knowledge-base-view__item-row {
10
+ display: flex;
11
+ align-items: flex-start;
12
+ gap: 16px;
13
+ }
14
+
15
+ .knowledge-base-view__item-main {
16
+ flex: 1;
17
+ min-width: 0;
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 4px;
21
+ }
22
+
23
+ .knowledge-base-view__item-title {
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 8px;
27
+ font-size: 12px;
28
+ line-height: 1.35;
29
+ font-weight: 500;
30
+ }
31
+
32
+ .knowledge-base-view__item-icon {
33
+ font-size: 18px;
34
+ color: var(--sub-text-color);
35
+ }
36
+
37
+ .knowledge-base-view__item-desc {
38
+ font-size: 12px;
39
+ color: var(--sub-text-color);
40
+ }
41
+
42
+ .knowledge-base-view__item-meta {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 8px;
46
+ flex-shrink: 0;
47
+ }
48
+
49
+ .knowledge-base-view__tag-list {
50
+ display: flex;
51
+ flex-wrap: wrap;
52
+ gap: 6px;
53
+ margin-top: 6px;
54
+ }
55
+
56
+ .knowledge-base-view__tag {
57
+ display: inline-flex;
58
+ align-items: center;
59
+ gap: 4px;
60
+ margin: 0;
61
+ border-radius: 4px;
62
+ }
63
+
64
+ .knowledge-base-view__tag-icon {
65
+ font-size: 12px;
66
+ color: var(--sub-text-color);
67
+ }
68
+
69
+ .knowledge-base-view__detail {
70
+ padding-top: 10px;
71
+ border-top: 1px solid var(--border-color);
72
+ }
73
+
74
+ .knowledge-base-view__markdown {
75
+ font-size: 12px;
76
+ }
77
+
78
+ .knowledge-base-view__icon-button {
79
+ display: inline-flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ width: 28px;
83
+ min-width: 28px;
84
+ height: 28px;
85
+ border-radius: 6px;
86
+ }
@@ -1,3 +1,5 @@
1
+ import './RuleItem.scss'
2
+
1
3
  import { Button, Empty, Tag, Tooltip } from 'antd'
2
4
  import React from 'react'
3
5
  import { useTranslation } from 'react-i18next'
@@ -14,6 +14,7 @@ interface RulesTabProps {
14
14
  filteredRules: RuleSummary[]
15
15
  isLoading: boolean
16
16
  query: string
17
+ onRefresh: () => void
17
18
  onQueryChange: (value: string) => void
18
19
  onCreate: () => void
19
20
  onImport: () => void
@@ -24,6 +25,7 @@ export function RulesTab({
24
25
  filteredRules,
25
26
  isLoading,
26
27
  query,
28
+ onRefresh,
27
29
  onQueryChange,
28
30
  onCreate,
29
31
  onImport
@@ -33,10 +35,14 @@ export function RulesTab({
33
35
  return (
34
36
  <TabContent className='knowledge-base-view__rules-tab'>
35
37
  <SectionHeader
36
- title={t('knowledge.rules.title')}
37
- description={t('knowledge.rules.desc')}
38
38
  actions={
39
39
  <Space>
40
+ <ActionButton
41
+ icon={<span className='material-symbols-rounded'>refresh</span>}
42
+ onClick={onRefresh}
43
+ >
44
+ {t('knowledge.actions.refresh')}
45
+ </ActionButton>
40
46
  <ActionButton
41
47
  icon={<span className='material-symbols-rounded'>download</span>}
42
48
  onClick={onImport}
@@ -1,22 +1,7 @@
1
1
  .knowledge-base-view__section-header {
2
2
  display: flex;
3
- align-items: flex-start;
4
- justify-content: space-between;
3
+ align-items: center;
4
+ justify-content: flex-end;
5
5
  gap: 16px;
6
- }
7
-
8
- .knowledge-base-view__section-info {
9
- display: flex;
10
- flex-direction: column;
11
- gap: 4px;
12
- }
13
-
14
- .knowledge-base-view__section-title {
15
- font-size: 16px;
16
- font-weight: 600;
17
- }
18
-
19
- .knowledge-base-view__section-desc {
20
- font-size: 12px;
21
- color: var(--sub-text-color);
6
+ padding: 0;
22
7
  }
@@ -3,18 +3,14 @@ import './SectionHeader.scss'
3
3
  import type { ReactNode } from 'react'
4
4
 
5
5
  interface SectionHeaderProps {
6
- title: string
7
- description: string
8
6
  actions?: ReactNode
9
7
  }
10
8
 
11
- export function SectionHeader({ title, description, actions }: SectionHeaderProps) {
9
+ export function SectionHeader({ actions }: SectionHeaderProps) {
10
+ if (actions == null) return null
11
+
12
12
  return (
13
13
  <div className='knowledge-base-view__section-header'>
14
- <div className='knowledge-base-view__section-info'>
15
- <div className='knowledge-base-view__section-title'>{title}</div>
16
- <div className='knowledge-base-view__section-desc'>{description}</div>
17
- </div>
18
14
  {actions}
19
15
  </div>
20
16
  )
@@ -9,20 +9,25 @@ import { SectionHeader } from './SectionHeader'
9
9
  import { TabContent } from './TabContent'
10
10
 
11
11
  interface SkillsTabProps {
12
+ onRefresh: () => void
12
13
  onCreate: () => void
13
14
  onImport: () => void
14
15
  }
15
16
 
16
- export function SkillsTab({ onCreate, onImport }: SkillsTabProps) {
17
+ export function SkillsTab({ onCreate, onImport, onRefresh }: SkillsTabProps) {
17
18
  const { t } = useTranslation()
18
19
 
19
20
  return (
20
21
  <TabContent className='knowledge-base-view__skills-tab'>
21
22
  <SectionHeader
22
- title={t('knowledge.skills.title')}
23
- description={t('knowledge.skills.desc')}
24
23
  actions={
25
24
  <Space>
25
+ <ActionButton
26
+ icon={<span className='material-symbols-rounded'>refresh</span>}
27
+ onClick={onRefresh}
28
+ >
29
+ {t('knowledge.actions.refresh')}
30
+ </ActionButton>
26
31
  <ActionButton
27
32
  icon={<span className='material-symbols-rounded'>download</span>}
28
33
  onClick={onImport}
@@ -2,8 +2,8 @@
2
2
  width: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
- gap: 12px;
6
- padding: 12px 16px;
5
+ gap: 10px;
6
+ padding: var(--subpage-tertiary-padding);
7
7
  }
8
8
 
9
9
  .knowledge-base-view__item-row {
@@ -24,7 +24,9 @@
24
24
  display: flex;
25
25
  align-items: center;
26
26
  gap: 8px;
27
- font-weight: 600;
27
+ font-size: 12px;
28
+ line-height: 1.35;
29
+ font-weight: 500;
28
30
  }
29
31
 
30
32
  .knowledge-base-view__item-icon {
@@ -56,6 +58,9 @@
56
58
  gap: 4px;
57
59
  padding: 0 8px;
58
60
  height: 28px;
61
+ border-radius: 6px;
62
+ border: 1px solid var(--border-color);
63
+ background: var(--bg-color);
59
64
  }
60
65
 
61
66
  .knowledge-base-view__meta-pill-icon {
@@ -113,6 +118,8 @@
113
118
  display: inline-flex;
114
119
  align-items: center;
115
120
  gap: 4px;
121
+ margin: 0;
122
+ border-radius: 4px;
116
123
  }
117
124
 
118
125
  .knowledge-base-view__tag-icon {
@@ -121,10 +128,8 @@
121
128
  }
122
129
 
123
130
  .knowledge-base-view__detail {
124
- border-radius: 10px;
125
- border: 1px solid var(--border-color);
126
- background: var(--code-bg);
127
- padding: 12px;
131
+ padding-top: 10px;
132
+ border-top: 1px solid var(--border-color);
128
133
  }
129
134
 
130
135
  .knowledge-base-view__markdown {
@@ -135,4 +140,8 @@
135
140
  display: inline-flex;
136
141
  align-items: center;
137
142
  justify-content: center;
143
+ width: 28px;
144
+ min-width: 28px;
145
+ height: 28px;
146
+ border-radius: 6px;
138
147
  }
@@ -0,0 +1,190 @@
1
+ import { useEffect, useRef } from 'react'
2
+ import type { RefObject } from 'react'
3
+
4
+ const FOCUSABLE_SELECTOR = [
5
+ 'a[href]',
6
+ 'button:not([disabled])',
7
+ 'input:not([disabled])',
8
+ 'select:not([disabled])',
9
+ 'textarea:not([disabled])',
10
+ '[tabindex]:not([tabindex="-1"])'
11
+ ].join(', ')
12
+
13
+ const getFocusableElements = (container: HTMLElement) => {
14
+ return Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR))
15
+ .filter((element) =>
16
+ !element.hasAttribute('disabled') && element.getAttribute('aria-hidden') !== 'true' &&
17
+ element.offsetParent !== null
18
+ )
19
+ }
20
+
21
+ const focusElement = (element: HTMLElement) => {
22
+ try {
23
+ element.focus({ preventScroll: true })
24
+ } catch {
25
+ element.focus()
26
+ }
27
+ }
28
+
29
+ const focusFirstElement = (container: HTMLElement) => {
30
+ const focusableElements = getFocusableElements(container)
31
+ const firstFocusableElement = focusableElements[0]
32
+ if (firstFocusableElement != null) {
33
+ focusElement(firstFocusableElement)
34
+ } else {
35
+ focusElement(container)
36
+ }
37
+ return focusableElements
38
+ }
39
+
40
+ export function useMobileSidebarModal({
41
+ backgroundRefs,
42
+ isCompactLayout,
43
+ isMobileSidebarOpen,
44
+ setIsMobileSidebarOpen,
45
+ sheetRef
46
+ }: {
47
+ backgroundRefs: Array<RefObject<HTMLElement | null>>
48
+ isCompactLayout: boolean
49
+ isMobileSidebarOpen: boolean
50
+ setIsMobileSidebarOpen: (nextOpen: boolean) => void
51
+ sheetRef: RefObject<HTMLDivElement | null>
52
+ }) {
53
+ const restoreFocusRef = useRef<HTMLElement | null>(null)
54
+
55
+ useEffect(() => {
56
+ if (!isCompactLayout) {
57
+ backgroundRefs.forEach((ref) => {
58
+ ref.current?.removeAttribute('inert')
59
+ })
60
+ return
61
+ }
62
+
63
+ backgroundRefs.forEach((ref) => {
64
+ const element = ref.current
65
+ if (element == null) {
66
+ return
67
+ }
68
+
69
+ if (isMobileSidebarOpen) {
70
+ element.setAttribute('inert', '')
71
+ } else {
72
+ element.removeAttribute('inert')
73
+ }
74
+ })
75
+
76
+ return () => {
77
+ backgroundRefs.forEach((ref) => {
78
+ ref.current?.removeAttribute('inert')
79
+ })
80
+ }
81
+ }, [backgroundRefs, isCompactLayout, isMobileSidebarOpen])
82
+
83
+ useEffect(() => {
84
+ if (!isCompactLayout || !isMobileSidebarOpen) {
85
+ return
86
+ }
87
+
88
+ const activeElement = document.activeElement
89
+ restoreFocusRef.current = activeElement instanceof HTMLElement ? activeElement : null
90
+
91
+ const focusFrame = window.requestAnimationFrame(() => {
92
+ const sheet = sheetRef.current
93
+ if (sheet == null) {
94
+ return
95
+ }
96
+
97
+ focusFirstElement(sheet)
98
+ })
99
+
100
+ const handleKeyDown = (event: KeyboardEvent) => {
101
+ if (event.key === 'Escape') {
102
+ setIsMobileSidebarOpen(false)
103
+ return
104
+ }
105
+
106
+ if (event.key !== 'Tab') {
107
+ return
108
+ }
109
+
110
+ const sheet = sheetRef.current
111
+ if (sheet == null) {
112
+ return
113
+ }
114
+
115
+ const focusableElements = getFocusableElements(sheet)
116
+ if (focusableElements.length === 0) {
117
+ event.preventDefault()
118
+ focusElement(sheet)
119
+ return
120
+ }
121
+
122
+ const firstElement = focusableElements[0]
123
+ const lastElement = focusableElements[focusableElements.length - 1]
124
+ const activeTarget = document.activeElement
125
+
126
+ if (event.shiftKey) {
127
+ if (activeTarget === firstElement || activeTarget === sheet) {
128
+ event.preventDefault()
129
+ focusElement(lastElement)
130
+ }
131
+ return
132
+ }
133
+
134
+ if (activeTarget === lastElement) {
135
+ event.preventDefault()
136
+ focusElement(firstElement)
137
+ }
138
+ }
139
+
140
+ const handleFocusIn = (event: FocusEvent) => {
141
+ const sheet = sheetRef.current
142
+ const focusTarget = event.target
143
+ if (sheet == null || !(focusTarget instanceof HTMLElement)) {
144
+ return
145
+ }
146
+
147
+ if (sheet.contains(focusTarget)) {
148
+ return
149
+ }
150
+
151
+ focusFirstElement(sheet)
152
+ }
153
+
154
+ window.addEventListener('keydown', handleKeyDown)
155
+ document.addEventListener('focusin', handleFocusIn)
156
+ return () => {
157
+ window.cancelAnimationFrame(focusFrame)
158
+ window.removeEventListener('keydown', handleKeyDown)
159
+ document.removeEventListener('focusin', handleFocusIn)
160
+
161
+ const restoreFocusTarget = restoreFocusRef.current
162
+ if (restoreFocusTarget != null && document.contains(restoreFocusTarget)) {
163
+ window.requestAnimationFrame(() => {
164
+ if (document.contains(restoreFocusTarget)) {
165
+ focusElement(restoreFocusTarget)
166
+ }
167
+ })
168
+ }
169
+ restoreFocusRef.current = null
170
+ }
171
+ }, [isCompactLayout, isMobileSidebarOpen, setIsMobileSidebarOpen, sheetRef])
172
+
173
+ useEffect(() => {
174
+ if (!isCompactLayout || !isMobileSidebarOpen) {
175
+ return
176
+ }
177
+
178
+ const { body, documentElement } = document
179
+ const previousBodyOverflow = body.style.overflow
180
+ const previousDocumentOverflow = documentElement.style.overflow
181
+
182
+ body.style.overflow = 'hidden'
183
+ documentElement.style.overflow = 'hidden'
184
+
185
+ return () => {
186
+ body.style.overflow = previousBodyOverflow
187
+ documentElement.style.overflow = previousDocumentOverflow
188
+ }
189
+ }, [isCompactLayout, isMobileSidebarOpen])
190
+ }
@@ -1,5 +1,6 @@
1
1
  .app-shell {
2
- height: 100vh;
2
+ min-height: 100vh;
3
+ height: 100dvh;
3
4
  display: flex;
4
5
  flex-direction: row;
5
6
  gap: 0;
@@ -17,6 +18,13 @@
17
18
  min-height: 0;
18
19
  }
19
20
 
21
+ .app-shell__content-region {
22
+ flex: 1;
23
+ display: flex;
24
+ min-width: 0;
25
+ min-height: 0;
26
+ }
27
+
20
28
  .app-shell__content {
21
29
  flex: 1;
22
30
  position: relative;
@@ -24,8 +32,7 @@
24
32
  overflow: hidden;
25
33
  min-width: 0;
26
34
  min-height: 0;
27
- padding: 4px 4px 4px 0;
28
- transition: padding-left .3s cubic-bezier(.4, 0, .2, 1);
35
+ padding: 0;
29
36
  border-radius: 0;
30
37
  background-color: var(--sub-bg-color);
31
38
  box-shadow:
@@ -33,8 +40,12 @@
33
40
  0 2px 8px rgba(15, 23, 42, .04);
34
41
  }
35
42
 
36
- .app-shell__content.is-sidebar-collapsed {
37
- padding-left: 4px;
43
+ .app-shell__content.app-shell__content--session {
44
+ padding: 12px 12px 12px 0;
45
+ }
46
+
47
+ .app-shell__content.app-shell__content--session.is-sidebar-collapsed {
48
+ padding: 4px;
38
49
  }
39
50
 
40
51
  .app-shell__content > * {
@@ -45,6 +56,83 @@
45
56
  overflow: hidden;
46
57
  }
47
58
 
59
+ .app-shell__content.is-flat {
60
+ padding: 0;
61
+ background-color: var(--sub-bg-color);
62
+ box-shadow: none;
63
+ }
64
+
65
+ .app-shell__content.is-flat > * {
66
+ border-radius: 0;
67
+ }
68
+
69
+ .app-shell__mobile-sidebar-backdrop {
70
+ position: fixed;
71
+ inset: 0;
72
+ border: none;
73
+ background: rgba(0, 0, 0, .28);
74
+ opacity: 0;
75
+ visibility: hidden;
76
+ pointer-events: none;
77
+ transition: opacity .24s ease, visibility 0s linear .24s;
78
+ z-index: 60;
79
+ }
80
+
81
+ .app-shell__mobile-sidebar-backdrop.is-open {
82
+ opacity: 1;
83
+ visibility: visible;
84
+ pointer-events: auto;
85
+ transition-delay: 0s;
86
+ }
87
+
88
+ .app-shell__mobile-sidebar-sheet {
89
+ position: fixed;
90
+ top: 0;
91
+ left: 0;
92
+ bottom: 0;
93
+ width: min(320px, calc(100vw - 24px));
94
+ max-width: calc(100vw - 24px);
95
+ padding: max(4px, env(safe-area-inset-top)) 0
96
+ max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
97
+ transform: translateX(-100%);
98
+ visibility: hidden;
99
+ transition:
100
+ transform .24s cubic-bezier(.4, 0, .2, 1),
101
+ visibility 0s linear .24s;
102
+ z-index: 61;
103
+ pointer-events: none;
104
+ overscroll-behavior: contain;
105
+ }
106
+
107
+ .app-shell__mobile-sidebar-sheet.is-open {
108
+ transform: translateX(0);
109
+ visibility: visible;
110
+ pointer-events: auto;
111
+ transition-delay: 0s;
112
+ }
113
+
114
+ .app-shell__mobile-sidebar-sheet > * {
115
+ height: 100%;
116
+ overflow: hidden;
117
+ border-radius: 0 8px 8px 0;
118
+ box-shadow: 0 16px 36px rgba(15, 23, 42, .22);
119
+ overscroll-behavior: contain;
120
+ }
121
+
122
+ .app-shell--compact {
123
+ flex-direction: column;
124
+
125
+ .app-shell__content {
126
+ padding: max(4px, env(safe-area-inset-top)) 4px 4px;
127
+ box-shadow: none;
128
+ background-color: var(--sub-bg-color);
129
+ }
130
+
131
+ .app-shell__content > * {
132
+ border-radius: 8px;
133
+ }
134
+ }
135
+
48
136
  .app-shell--dark {
49
137
  background:
50
138
  linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0)),
@@ -52,6 +140,18 @@
52
140
 
53
141
  .app-shell__content {
54
142
  background-color: var(--sub-bg-color);
55
- box-shadow: 0 18px 48px rgba(0, 0, 0, .3), 0 2px 10px rgba(0, 0, 0, .22);
143
+ box-shadow: none;
144
+ }
145
+
146
+ .app-shell__mobile-sidebar-backdrop {
147
+ background: rgba(0, 0, 0, .48);
148
+ }
149
+
150
+ .app-shell__mobile-sidebar-sheet > * {
151
+ box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
152
+ }
153
+
154
+ .app-shell__content.is-flat {
155
+ box-shadow: none;
56
156
  }
57
157
  }