@vibe-forge/client 0.2.0-alpha.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 (184) hide show
  1. package/LICENSE +21 -0
  2. package/cli.cjs +6 -0
  3. package/index.html +27 -0
  4. package/package.json +42 -0
  5. package/src/App.tsx +174 -0
  6. package/src/api.ts +241 -0
  7. package/src/components/ArchiveView.scss +168 -0
  8. package/src/components/ArchiveView.tsx +299 -0
  9. package/src/components/AutomationView/AutomationView.scss +26 -0
  10. package/src/components/AutomationView/RuleFormPanel.scss +129 -0
  11. package/src/components/AutomationView/RuleFormPanel.tsx +257 -0
  12. package/src/components/AutomationView/RuleSidebar.scss +219 -0
  13. package/src/components/AutomationView/RuleSidebar.tsx +258 -0
  14. package/src/components/AutomationView/RunHistoryPanel.scss +286 -0
  15. package/src/components/AutomationView/RunHistoryPanel.tsx +320 -0
  16. package/src/components/AutomationView/TaskList.scss +128 -0
  17. package/src/components/AutomationView/TaskList.tsx +79 -0
  18. package/src/components/AutomationView/TriggerList.scss +153 -0
  19. package/src/components/AutomationView/TriggerList.tsx +217 -0
  20. package/src/components/AutomationView/index.tsx +228 -0
  21. package/src/components/AutomationView/types.ts +21 -0
  22. package/src/components/Chat.scss +89 -0
  23. package/src/components/Chat.tsx +92 -0
  24. package/src/components/ConfigView.scss +185 -0
  25. package/src/components/ConfigView.tsx +258 -0
  26. package/src/components/NavRail.scss +71 -0
  27. package/src/components/NavRail.tsx +188 -0
  28. package/src/components/Sidebar.scss +112 -0
  29. package/src/components/Sidebar.tsx +291 -0
  30. package/src/components/chat/ChatHeader.scss +401 -0
  31. package/src/components/chat/ChatHeader.tsx +342 -0
  32. package/src/components/chat/ChatHistoryView.tsx +122 -0
  33. package/src/components/chat/ChatSettingsView.tsx +22 -0
  34. package/src/components/chat/ChatTimelineView.scss +53 -0
  35. package/src/components/chat/ChatTimelineView.tsx +158 -0
  36. package/src/components/chat/CodeBlock.scss +87 -0
  37. package/src/components/chat/CodeBlock.tsx +179 -0
  38. package/src/components/chat/CompletionMenu.scss +70 -0
  39. package/src/components/chat/CompletionMenu.tsx +58 -0
  40. package/src/components/chat/CurrentTodoList.scss +217 -0
  41. package/src/components/chat/CurrentTodoList.tsx +103 -0
  42. package/src/components/chat/MarkdownContent.tsx +43 -0
  43. package/src/components/chat/MessageFooter.tsx +48 -0
  44. package/src/components/chat/MessageItem.scss +251 -0
  45. package/src/components/chat/MessageItem.tsx +78 -0
  46. package/src/components/chat/NewSessionGuide.scss +186 -0
  47. package/src/components/chat/NewSessionGuide.tsx +167 -0
  48. package/src/components/chat/Sender.scss +367 -0
  49. package/src/components/chat/Sender.tsx +541 -0
  50. package/src/components/chat/SessionTimelinePanel/EventList.scss +58 -0
  51. package/src/components/chat/SessionTimelinePanel/EventList.tsx +212 -0
  52. package/src/components/chat/SessionTimelinePanel/gantt.ts +177 -0
  53. package/src/components/chat/SessionTimelinePanel/git-graph.ts +518 -0
  54. package/src/components/chat/SessionTimelinePanel/index.scss +28 -0
  55. package/src/components/chat/SessionTimelinePanel/index.tsx +121 -0
  56. package/src/components/chat/SessionTimelinePanel/mermaid.ts +4 -0
  57. package/src/components/chat/SessionTimelinePanel/types.ts +64 -0
  58. package/src/components/chat/SessionTimelinePanel/utils.ts +20 -0
  59. package/src/components/chat/ThinkingStatus.scss +70 -0
  60. package/src/components/chat/ThinkingStatus.tsx +13 -0
  61. package/src/components/chat/ToolCallBox.scss +137 -0
  62. package/src/components/chat/ToolCallBox.tsx +55 -0
  63. package/src/components/chat/ToolGroup.scss +154 -0
  64. package/src/components/chat/ToolGroup.tsx +102 -0
  65. package/src/components/chat/ToolRenderer.tsx +45 -0
  66. package/src/components/chat/messageUtils.ts +171 -0
  67. package/src/components/chat/safeSerialize.ts +84 -0
  68. package/src/components/chat/tools/DefaultTool.tsx +63 -0
  69. package/src/components/chat/tools/adapter-claude/BashTool.scss +71 -0
  70. package/src/components/chat/tools/adapter-claude/BashTool.tsx +82 -0
  71. package/src/components/chat/tools/adapter-claude/GlobTool.scss +88 -0
  72. package/src/components/chat/tools/adapter-claude/GlobTool.tsx +85 -0
  73. package/src/components/chat/tools/adapter-claude/GrepTool.scss +96 -0
  74. package/src/components/chat/tools/adapter-claude/GrepTool.tsx +114 -0
  75. package/src/components/chat/tools/adapter-claude/LSTool.scss +85 -0
  76. package/src/components/chat/tools/adapter-claude/LSTool.tsx +94 -0
  77. package/src/components/chat/tools/adapter-claude/ReadTool.scss +57 -0
  78. package/src/components/chat/tools/adapter-claude/ReadTool.tsx +87 -0
  79. package/src/components/chat/tools/adapter-claude/TodoTool.scss +78 -0
  80. package/src/components/chat/tools/adapter-claude/TodoTool.tsx +60 -0
  81. package/src/components/chat/tools/adapter-claude/WriteTool.scss +92 -0
  82. package/src/components/chat/tools/adapter-claude/WriteTool.tsx +86 -0
  83. package/src/components/chat/tools/adapter-claude/components/FileList.scss +65 -0
  84. package/src/components/chat/tools/adapter-claude/components/FileList.tsx +185 -0
  85. package/src/components/chat/tools/adapter-claude/index.ts +28 -0
  86. package/src/components/chat/tools/defineToolRender.ts +28 -0
  87. package/src/components/chat/tools/task/GetTaskInfoTool.scss +50 -0
  88. package/src/components/chat/tools/task/GetTaskInfoTool.tsx +88 -0
  89. package/src/components/chat/tools/task/ListTasksTool.scss +56 -0
  90. package/src/components/chat/tools/task/ListTasksTool.tsx +83 -0
  91. package/src/components/chat/tools/task/StartTasksTool.scss +56 -0
  92. package/src/components/chat/tools/task/StartTasksTool.tsx +96 -0
  93. package/src/components/chat/tools/task/components/TaskToolCard.scss +127 -0
  94. package/src/components/chat/tools/task/components/TaskToolCard.tsx +177 -0
  95. package/src/components/chat/tools/task/index.ts +15 -0
  96. package/src/components/chat/useChatModels.tsx +206 -0
  97. package/src/components/chat/useChatSession.ts +370 -0
  98. package/src/components/config/ConfigAboutSection.scss +111 -0
  99. package/src/components/config/ConfigAboutSection.tsx +86 -0
  100. package/src/components/config/ConfigDisplayValue.scss +22 -0
  101. package/src/components/config/ConfigDisplayValue.tsx +62 -0
  102. package/src/components/config/ConfigEditors.scss +65 -0
  103. package/src/components/config/ConfigEditors.tsx +98 -0
  104. package/src/components/config/ConfigFieldRow.scss +97 -0
  105. package/src/components/config/ConfigFieldRow.tsx +36 -0
  106. package/src/components/config/ConfigSectionForm.scss +94 -0
  107. package/src/components/config/ConfigSectionForm.tsx +436 -0
  108. package/src/components/config/ConfigSectionPanel.tsx +67 -0
  109. package/src/components/config/ConfigShortcutInput.scss +11 -0
  110. package/src/components/config/ConfigShortcutInput.tsx +52 -0
  111. package/src/components/config/ConfigSourceSwitch.tsx +57 -0
  112. package/src/components/config/configSchema.ts +319 -0
  113. package/src/components/config/configUtils.ts +83 -0
  114. package/src/components/config/index.tsx +5 -0
  115. package/src/components/config/recordEditors/BooleanRecordEditor.scss +1 -0
  116. package/src/components/config/recordEditors/BooleanRecordEditor.tsx +75 -0
  117. package/src/components/config/recordEditors/KeyValueEditor.scss +1 -0
  118. package/src/components/config/recordEditors/KeyValueEditor.tsx +97 -0
  119. package/src/components/config/recordEditors/McpServersRecordEditor.scss +1 -0
  120. package/src/components/config/recordEditors/McpServersRecordEditor.tsx +258 -0
  121. package/src/components/config/recordEditors/ModelServicesRecordEditor.scss +1 -0
  122. package/src/components/config/recordEditors/ModelServicesRecordEditor.tsx +233 -0
  123. package/src/components/config/recordEditors/RecordEditors.scss +117 -0
  124. package/src/components/config/recordEditors/RecordJsonEditor.scss +1 -0
  125. package/src/components/config/recordEditors/RecordJsonEditor.tsx +113 -0
  126. package/src/components/config/recordEditors/index.tsx +5 -0
  127. package/src/components/knowledge-base/KnowledgeBaseView.scss +19 -0
  128. package/src/components/knowledge-base/KnowledgeBaseView.tsx +186 -0
  129. package/src/components/knowledge-base/components/ActionButton.scss +5 -0
  130. package/src/components/knowledge-base/components/ActionButton.tsx +9 -0
  131. package/src/components/knowledge-base/components/EmptyState.scss +19 -0
  132. package/src/components/knowledge-base/components/EmptyState.tsx +42 -0
  133. package/src/components/knowledge-base/components/EntitiesTab.scss +5 -0
  134. package/src/components/knowledge-base/components/EntitiesTab.tsx +80 -0
  135. package/src/components/knowledge-base/components/EntityItem.scss +82 -0
  136. package/src/components/knowledge-base/components/EntityItem.tsx +79 -0
  137. package/src/components/knowledge-base/components/EntityList.scss +5 -0
  138. package/src/components/knowledge-base/components/EntityList.tsx +70 -0
  139. package/src/components/knowledge-base/components/FilterBar.scss +21 -0
  140. package/src/components/knowledge-base/components/FilterBar.tsx +51 -0
  141. package/src/components/knowledge-base/components/FlowsTab.scss +5 -0
  142. package/src/components/knowledge-base/components/FlowsTab.tsx +80 -0
  143. package/src/components/knowledge-base/components/KnowledgeBaseHeader.scss +27 -0
  144. package/src/components/knowledge-base/components/KnowledgeBaseHeader.tsx +29 -0
  145. package/src/components/knowledge-base/components/KnowledgeList.scss +19 -0
  146. package/src/components/knowledge-base/components/KnowledgeList.tsx +19 -0
  147. package/src/components/knowledge-base/components/LoadingState.scss +5 -0
  148. package/src/components/knowledge-base/components/LoadingState.tsx +11 -0
  149. package/src/components/knowledge-base/components/MetaList.scss +19 -0
  150. package/src/components/knowledge-base/components/MetaList.tsx +18 -0
  151. package/src/components/knowledge-base/components/RulesTab.scss +5 -0
  152. package/src/components/knowledge-base/components/RulesTab.tsx +49 -0
  153. package/src/components/knowledge-base/components/SectionHeader.scss +22 -0
  154. package/src/components/knowledge-base/components/SectionHeader.tsx +21 -0
  155. package/src/components/knowledge-base/components/SkillsTab.scss +5 -0
  156. package/src/components/knowledge-base/components/SkillsTab.tsx +49 -0
  157. package/src/components/knowledge-base/components/SpecItem.scss +138 -0
  158. package/src/components/knowledge-base/components/SpecItem.tsx +131 -0
  159. package/src/components/knowledge-base/components/SpecList.scss +5 -0
  160. package/src/components/knowledge-base/components/SpecList.tsx +70 -0
  161. package/src/components/knowledge-base/components/TabContent.scss +8 -0
  162. package/src/components/knowledge-base/components/TabContent.tsx +17 -0
  163. package/src/components/knowledge-base/components/TabLabel.scss +10 -0
  164. package/src/components/knowledge-base/components/TabLabel.tsx +15 -0
  165. package/src/components/knowledge-base/index.tsx +1 -0
  166. package/src/components/sidebar/SessionItem.scss +256 -0
  167. package/src/components/sidebar/SessionItem.tsx +265 -0
  168. package/src/components/sidebar/SessionList.scss +92 -0
  169. package/src/components/sidebar/SessionList.tsx +166 -0
  170. package/src/components/sidebar/SidebarHeader.scss +79 -0
  171. package/src/components/sidebar/SidebarHeader.tsx +128 -0
  172. package/src/connectionManager.ts +172 -0
  173. package/src/hooks/useGlobalShortcut.ts +26 -0
  174. package/src/hooks/useQueryParams.ts +54 -0
  175. package/src/i18n.ts +22 -0
  176. package/src/main.tsx +41 -0
  177. package/src/resources/locales/en.json +765 -0
  178. package/src/resources/locales/zh.json +766 -0
  179. package/src/store/index.ts +23 -0
  180. package/src/styles/global.scss +100 -0
  181. package/src/utils/shortcutUtils.ts +88 -0
  182. package/src/vite-env.d.ts +12 -0
  183. package/src/ws.ts +33 -0
  184. package/vite.config.ts +26 -0
@@ -0,0 +1,167 @@
1
+ import './NewSessionGuide.scss'
2
+
3
+ import { App, Button } from 'antd'
4
+ import React from 'react'
5
+ import { useTranslation } from 'react-i18next'
6
+ import useSWR from 'swr'
7
+
8
+ import type { EntitySummary, SpecSummary } from '#~/api.js'
9
+
10
+ export function NewSessionGuide() {
11
+ const { t } = useTranslation()
12
+ const { message } = App.useApp()
13
+
14
+ const { data: specsRes } = useSWR<{ specs: SpecSummary[] }>('/api/ai/specs')
15
+ const { data: entitiesRes } = useSWR<{ entities: EntitySummary[] }>('/api/ai/entities')
16
+ const { data: configRes } = useSWR<{
17
+ sources: {
18
+ merged: {
19
+ general?: {
20
+ announcements: string[]
21
+ }
22
+ }
23
+ }
24
+ }>(
25
+ '/api/config'
26
+ )
27
+
28
+ const specs = specsRes?.specs ?? []
29
+ const entities = entitiesRes?.entities ?? []
30
+ const isSpecsReady = specsRes != null
31
+ const isEntitiesReady = entitiesRes != null
32
+ const { announcements = [] } = configRes?.sources.merged?.general ?? {}
33
+
34
+ const helpItems = [
35
+ t('chat.newSessionGuide.help.item1'),
36
+ t('chat.newSessionGuide.help.item2'),
37
+ t('chat.newSessionGuide.help.item3')
38
+ ]
39
+
40
+ const handleCreateSpec = () => {
41
+ message.info(t('chat.newSessionGuide.specs.createToast'))
42
+ }
43
+
44
+ const handleCreateEntity = () => {
45
+ message.info(t('chat.newSessionGuide.entities.createToast'))
46
+ }
47
+
48
+ return (
49
+ <div className='new-session-guide'>
50
+ {announcements.length > 0 && (
51
+ <div className='new-session-guide__announcements'>
52
+ <div className='new-session-guide__announcements-header'>
53
+ <span className='material-symbols-rounded new-session-guide__announcements-icon'>campaign</span>
54
+ <span>{t('chat.newSessionGuide.announcements.title')}</span>
55
+ </div>
56
+ <div className='new-session-guide__announcements-list'>
57
+ {announcements.map((item, index) => (
58
+ <div key={`${item}-${index}`} className='new-session-guide__announcements-item'>
59
+ <span>{item}</span>
60
+ </div>
61
+ ))}
62
+ </div>
63
+ </div>
64
+ )}
65
+ <div className='new-session-guide__grid'>
66
+ <div className='new-session-guide__card'>
67
+ <div className='new-session-guide__header'>
68
+ <div className='new-session-guide__title'>
69
+ <span className='material-symbols-rounded new-session-guide__title-icon'>account_tree</span>
70
+ <span>{t('chat.newSessionGuide.specs.title')}</span>
71
+ </div>
72
+ <div className='new-session-guide__count'>{specs.length}</div>
73
+ </div>
74
+ <div className='new-session-guide__body'>
75
+ {!isSpecsReady && (
76
+ <div className='new-session-guide__loading'>{t('chat.newSessionGuide.loading')}</div>
77
+ )}
78
+ {isSpecsReady && specs.length > 0 && (
79
+ <div className='new-session-guide__list'>
80
+ {specs.map((spec) => (
81
+ <div key={spec.id} className='new-session-guide__item'>
82
+ <div className='new-session-guide__item-title'>
83
+ <span className='material-symbols-rounded new-session-guide__item-icon'>route</span>
84
+ <span>{spec.name}</span>
85
+ </div>
86
+ <div className='new-session-guide__item-desc'>{spec.description}</div>
87
+ {spec.params.length > 0 && (
88
+ <div className='new-session-guide__meta'>
89
+ {t('chat.newSessionGuide.specs.params', { count: spec.params.length })}
90
+ </div>
91
+ )}
92
+ </div>
93
+ ))}
94
+ </div>
95
+ )}
96
+ {isSpecsReady && specs.length === 0 && (
97
+ <div className='new-session-guide__empty'>
98
+ <div className='new-session-guide__empty-desc'>{t('chat.newSessionGuide.specs.empty')}</div>
99
+ <Button type='primary' size='small' onClick={handleCreateSpec}>
100
+ {t('chat.newSessionGuide.specs.create')}
101
+ </Button>
102
+ </div>
103
+ )}
104
+ </div>
105
+ </div>
106
+
107
+ <div className='new-session-guide__card'>
108
+ <div className='new-session-guide__header'>
109
+ <div className='new-session-guide__title'>
110
+ <span className='material-symbols-rounded new-session-guide__title-icon'>group_work</span>
111
+ <span>{t('chat.newSessionGuide.entities.title')}</span>
112
+ </div>
113
+ <div className='new-session-guide__count'>{entities.length}</div>
114
+ </div>
115
+ <div className='new-session-guide__body'>
116
+ {!isEntitiesReady && (
117
+ <div className='new-session-guide__loading'>{t('chat.newSessionGuide.loading')}</div>
118
+ )}
119
+ {isEntitiesReady && entities.length > 0 && (
120
+ <div className='new-session-guide__list'>
121
+ {entities.map((entity) => (
122
+ <div key={entity.id} className='new-session-guide__item'>
123
+ <div className='new-session-guide__item-title'>
124
+ <span className='material-symbols-rounded new-session-guide__item-icon'>person</span>
125
+ <span>{entity.name}</span>
126
+ </div>
127
+ <div className='new-session-guide__item-desc'>{entity.description}</div>
128
+ </div>
129
+ ))}
130
+ </div>
131
+ )}
132
+ {isEntitiesReady && entities.length === 0 && (
133
+ <div className='new-session-guide__empty'>
134
+ <div className='new-session-guide__empty-desc'>{t('chat.newSessionGuide.entities.empty')}</div>
135
+ <Button type='primary' size='small' onClick={handleCreateEntity}>
136
+ {t('chat.newSessionGuide.entities.create')}
137
+ </Button>
138
+ </div>
139
+ )}
140
+ </div>
141
+ </div>
142
+
143
+ <div className='new-session-guide__card'>
144
+ <div className='new-session-guide__header'>
145
+ <div className='new-session-guide__title'>
146
+ <span className='material-symbols-rounded new-session-guide__title-icon'>tips_and_updates</span>
147
+ <span>{t('chat.newSessionGuide.help.title')}</span>
148
+ </div>
149
+ </div>
150
+ <div className='new-session-guide__body'>
151
+ <div className='new-session-guide__help'>
152
+ {helpItems.map(item => (
153
+ <div key={item} className='new-session-guide__help-item'>
154
+ <span className='material-symbols-rounded new-session-guide__help-icon'>check_circle</span>
155
+ <span>{item}</span>
156
+ </div>
157
+ ))}
158
+ </div>
159
+ <div className='new-session-guide__help-footer'>
160
+ {t('chat.newSessionGuide.help.footer')}
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ )
167
+ }
@@ -0,0 +1,367 @@
1
+ .chat-input-wrapper {
2
+ border-top: none;
3
+ position: relative;
4
+ background-color: var(--bg-color);
5
+ }
6
+
7
+ .chat-input-container {
8
+ position: relative;
9
+ display: flex;
10
+ flex-direction: column;
11
+ background-color: var(--input-bg, #f9fafb);
12
+ border: 1px solid var(--border-color);
13
+ border-radius: 12px;
14
+ padding: 8px 12px;
15
+ transition: all .2s;
16
+
17
+ &:focus-within {
18
+ border-color: #3b82f6;
19
+ background-color: var(--input-focus-bg, #f9fafb);
20
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, .1);
21
+ }
22
+
23
+ textarea {
24
+ color: var(--text-color);
25
+ background: transparent;
26
+ &::placeholder {
27
+ color: var(--sub-text-color, #9ca3af);
28
+ }
29
+ }
30
+
31
+ .model-unavailable {
32
+ margin-bottom: 6px;
33
+ padding: 6px 8px;
34
+ border-radius: 8px;
35
+ border: 1px dashed var(--border-color);
36
+ background-color: var(--tag-bg, #f9fafb);
37
+ color: var(--placeholder-color);
38
+ font-size: 12px;
39
+ }
40
+ }
41
+
42
+ .chat-input-toolbar {
43
+ display: flex;
44
+ justify-content: space-between;
45
+ align-items: center;
46
+ margin-top: 4px;
47
+ padding-top: 4px;
48
+
49
+ .toolbar-left {
50
+ display: flex;
51
+ align-items: center;
52
+ gap: 4px;
53
+
54
+ .session-info-toolbar {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: 4px;
58
+ margin-left: 4px;
59
+ padding-left: 8px;
60
+ border-left: 2px solid var(--border-color);
61
+ border-radius: 1px;
62
+ position: relative;
63
+ height: 14px;
64
+ align-self: center;
65
+
66
+ .info-item {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 4px;
70
+ font-size: 13px;
71
+ color: var(--sub-text-color, #9ca3af);
72
+ background-color: transparent;
73
+ padding: 2px 4px;
74
+ border-radius: 4px;
75
+ white-space: nowrap;
76
+ max-width: 150px;
77
+ cursor: pointer;
78
+ transition: all .2s;
79
+
80
+ .material-symbols-rounded {
81
+ font-size: 18px;
82
+ }
83
+
84
+ .info-text {
85
+ overflow: hidden;
86
+ text-overflow: ellipsis;
87
+ font-weight: 400;
88
+ }
89
+
90
+ .arrow-icon {
91
+ font-size: 16px;
92
+ color: var(--sub-text-color, #9ca3af);
93
+ transition: transform .2s;
94
+ }
95
+
96
+ &:hover, &.active {
97
+ color: #3b82f6;
98
+ .arrow-icon {
99
+ color: #3b82f6;
100
+ }
101
+ }
102
+
103
+ &.active .arrow-icon {
104
+ transform: rotate(180deg);
105
+ }
106
+ }
107
+
108
+ .tools-list-popup {
109
+ position: absolute;
110
+ bottom: calc(100% + 12px);
111
+ left: 12px;
112
+ background: var(--bg-color);
113
+ border: 1px solid var(--border-color);
114
+ border-radius: 12px;
115
+ box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
116
+ min-width: 200px;
117
+ max-height: 300px;
118
+ overflow: hidden;
119
+ display: flex;
120
+ flex-direction: column;
121
+ z-index: 100;
122
+ animation: slideUp .2s ease-out;
123
+
124
+ .popup-header {
125
+ padding: 10px 12px;
126
+ font-size: 12px;
127
+ font-weight: 600;
128
+ color: var(--sub-text-color, #9ca3af);
129
+ border-bottom: 1px solid var(--border-color);
130
+ background: var(--tag-bg, #f9fafb);
131
+ }
132
+
133
+ .popup-content {
134
+ padding: 6px;
135
+ overflow-y: auto;
136
+
137
+ .tool-item {
138
+ display: flex;
139
+ align-items: center;
140
+ gap: 8px;
141
+ padding: 8px 10px;
142
+ border-radius: 6px;
143
+ color: var(--text-color);
144
+ transition: all .2s;
145
+
146
+ .material-symbols-rounded {
147
+ font-size: 18px;
148
+ color: #3b82f6;
149
+ }
150
+
151
+ .tool-name {
152
+ font-size: 13px;
153
+ }
154
+
155
+ &:hover {
156
+ background-color: var(--tag-hover-bg, #f3f4f6);
157
+ color: var(--text-color);
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+
165
+ .toolbar-right {
166
+ display: flex;
167
+ align-items: center;
168
+ gap: 4px;
169
+ }
170
+
171
+ .toolbar-btn {
172
+ width: 24px;
173
+ height: 24px;
174
+ display: flex;
175
+ align-items: center;
176
+ justify-content: center;
177
+ border-radius: 4px;
178
+ cursor: pointer;
179
+ color: var(--sub-text-color, #9ca3af);
180
+ transition: all .2s;
181
+
182
+ &:hover {
183
+ background-color: transparent;
184
+ color: #3b82f6;
185
+ }
186
+
187
+ .material-symbols-rounded {
188
+ font-size: 20px;
189
+ line-height: 1;
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ }
194
+
195
+ &.model-switcher {
196
+ width: auto;
197
+ height: 28px;
198
+ padding: 0 8px;
199
+ gap: 4px;
200
+ background-color: var(--tag-hover-bg, #f3f4f6);
201
+ border: 1px solid var(--border-color);
202
+ color: var(--sub-text-color, #6b7280);
203
+
204
+ .model-name {
205
+ font-size: 12px;
206
+ font-weight: 500;
207
+ }
208
+
209
+ .arrow {
210
+ font-size: 14px;
211
+ }
212
+
213
+ &:hover {
214
+ border-color: #3b82f6;
215
+ background-color: var(--bg-color);
216
+ color: #3b82f6;
217
+ }
218
+ }
219
+ }
220
+ }
221
+
222
+ .model-select {
223
+ min-width: 160px;
224
+
225
+ .ant-select-selector {
226
+ height: 28px !important;
227
+ border-radius: 8px !important;
228
+ border: 1px solid var(--border-color) !important;
229
+ background-color: var(--tag-hover-bg, #f3f4f6) !important;
230
+ padding: 0 8px !important;
231
+ display: flex;
232
+ align-items: center;
233
+ }
234
+
235
+ .ant-select-selection-item,
236
+ .ant-select-selection-placeholder {
237
+ font-size: 12px;
238
+ color: var(--text-color);
239
+ line-height: 1;
240
+ }
241
+
242
+ &.ant-select-disabled .ant-select-selector {
243
+ background-color: var(--tag-bg, #f9fafb) !important;
244
+ color: var(--sub-text-color, #9ca3af);
245
+ }
246
+ }
247
+
248
+ .model-select-popup {
249
+ .ant-select-item-group {
250
+ padding: 8px 8px 4px;
251
+ color: var(--text-color);
252
+ font-weight: 600;
253
+ font-size: 12px;
254
+ }
255
+
256
+ .model-group-label {
257
+ display: flex;
258
+ flex-direction: column;
259
+ gap: 2px;
260
+ }
261
+
262
+ .model-group-title {
263
+ font-size: 12px;
264
+ font-weight: 600;
265
+ color: var(--placeholder-color);
266
+ }
267
+
268
+ .model-group-desc {
269
+ font-size: 11px;
270
+ color: var(--placeholder-color);
271
+ }
272
+
273
+ .model-option {
274
+ display: flex;
275
+ flex-direction: column;
276
+ gap: 2px;
277
+ }
278
+
279
+ .model-option-title {
280
+ font-size: 13px;
281
+ font-weight: 500;
282
+ color: var(--text-color);
283
+ }
284
+
285
+ .model-option-desc {
286
+ font-size: 12px;
287
+ color: var(--sub-text-color, #9ca3af);
288
+ }
289
+ }
290
+
291
+ html.dark {
292
+ .chat-input-container {
293
+ --input-bg: #1f1f1f;
294
+ --input-focus-bg: #141414;
295
+ }
296
+ }
297
+
298
+ .chat-input-textarea {
299
+ background: transparent !important;
300
+ padding: 4px 0 !important;
301
+ font-size: 14px;
302
+ line-height: 1.5;
303
+ color: #111827;
304
+
305
+ &::placeholder {
306
+ color: #9ca3af;
307
+ }
308
+ }
309
+
310
+ .chat-send-btn {
311
+ width: 32px;
312
+ height: 32px;
313
+ margin-bottom: 1px;
314
+ border-radius: 8px;
315
+ background-color: transparent;
316
+ display: flex;
317
+ align-items: center;
318
+ justify-content: center;
319
+ cursor: pointer;
320
+ transition: all .2s;
321
+ color: #9ca3af;
322
+ flex-shrink: 0;
323
+
324
+ .material-symbols-rounded {
325
+ display: inline-flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ line-height: 1;
329
+ font-size: 20px;
330
+ }
331
+
332
+ &:hover {
333
+ color: #3b82f6;
334
+ }
335
+
336
+ &.active {
337
+ color: #3b82f6;
338
+
339
+ &:hover {
340
+ color: #2563eb;
341
+ }
342
+ }
343
+
344
+ &.thinking {
345
+ color: #ef4444;
346
+
347
+ &:hover {
348
+ color: #dc2626;
349
+ }
350
+ }
351
+
352
+ &.disabled {
353
+ color: #9ca3af;
354
+ cursor: not-allowed;
355
+
356
+ &:hover {
357
+ color: #9ca3af;
358
+ }
359
+ }
360
+ }
361
+
362
+ .chat-input-hint {
363
+ margin-top: 4px;
364
+ text-align: center;
365
+ font-size: 12px;
366
+ color: #9ca3af;
367
+ }