@baishuyun/ai-design 2.1.0-alpha.4 → 2.1.3

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 (72) hide show
  1. package/.storybook/preview.ts +2 -0
  2. package/CHANGELOG.md +197 -28
  3. package/package.json +11 -11
  4. package/scripts/post-build.cjs +32 -0
  5. package/src/components/agent-drawer.tsx +119 -0
  6. package/src/components/agent-helper/agent-entry-card/index.tsx +3 -8
  7. package/src/components/agent-helper/agent-helper-card/index.tsx +3 -3
  8. package/src/components/agent-helper/app-select/index.tsx +119 -84
  9. package/src/components/agent-helper/condition-input/index.tsx +18 -21
  10. package/src/components/agent-helper/condition-item/index.tsx +1 -0
  11. package/src/components/agent-helper/field-edit-preference-select/index.tsx +31 -4
  12. package/src/components/agent-helper/field-value-input/dept-select.tsx +447 -0
  13. package/src/components/agent-helper/field-value-input/index.tsx +3 -2
  14. package/src/components/agent-helper/field-value-input/picker-inputs.tsx +20 -18
  15. package/src/components/agent-helper/form-select/index.tsx +12 -25
  16. package/src/components/agent-helper/relational-operator-select/index.tsx +37 -23
  17. package/src/components/agent-helper/table/index.tsx +6 -2
  18. package/src/components/agent-helper/team-wide-form-select/data-adapter.ts +109 -0
  19. package/src/components/agent-helper/team-wide-form-select/index.tsx +289 -0
  20. package/src/components/agent-helper/team-wide-form-select/tree-panel.tsx +180 -0
  21. package/src/components/agent-helper/team-wide-form-select/types.ts +36 -0
  22. package/src/components/agent-helper/team-wide-form-select/use-form-tree.ts +108 -0
  23. package/src/components/agent-helper/trigger-select/index.tsx +1 -1
  24. package/src/components/agent-select.tsx +115 -35
  25. package/src/components/bot-avatar-name.tsx +1 -1
  26. package/src/components/bs-entry-select/build-tree.ts +0 -6
  27. package/src/components/bs-entry-select/entry-item.tsx +7 -11
  28. package/src/components/bs-entry-select/other-app-section.tsx +2 -4
  29. package/src/components/bs-entry-select/scroll-slider.tsx +6 -11
  30. package/src/components/bs-icons.tsx +752 -206
  31. package/src/components/card.tsx +55 -10
  32. package/src/components/circle-checker.tsx +18 -3
  33. package/src/components/collapsible-txt-msg.tsx +18 -13
  34. package/src/components/fake-bot-msg.tsx +18 -7
  35. package/src/components/field-checker-list-msg.tsx +4 -3
  36. package/src/components/fields-design-info-table.tsx +9 -26
  37. package/src/components/fields-portal.tsx +2 -2
  38. package/src/components/fields-previewer.tsx +1 -0
  39. package/src/components/font-icon.tsx +20 -9
  40. package/src/components/form-info-editor.tsx +21 -6
  41. package/src/components/legacy-slot.tsx +11 -16
  42. package/src/components/memoized-markdown.tsx +32 -19
  43. package/src/components/message-content.tsx +7 -3
  44. package/src/components/output-config-editor.tsx +39 -25
  45. package/src/components/primary-confirm-btn.tsx +6 -1
  46. package/src/components/scroll-to-bottom-btn.tsx +3 -2
  47. package/src/components/shadow-content.tsx +19 -0
  48. package/src/components/shadow-portal.tsx +23 -0
  49. package/src/components/ui/dialog.tsx +4 -1
  50. package/src/components/ui/drawer.tsx +3 -1
  51. package/src/components/ui/enhanced-drawer.tsx +134 -0
  52. package/src/components/ui/popover.tsx +3 -2
  53. package/src/components/ui/select.tsx +3 -2
  54. package/src/components/ui/tooltip.tsx +3 -2
  55. package/src/components/user-txt-msg-bubble.tsx +41 -19
  56. package/src/components/warning-msg.tsx +29 -12
  57. package/src/const/shadow.ts +17 -0
  58. package/src/const/ui.ts +2 -2
  59. package/src/hooks/use-column-appear.ts +1 -1
  60. package/src/hooks/use-portal-container.ts +6 -3
  61. package/src/hooks/use-shadow-boundary.ts +67 -0
  62. package/src/hooks/use-shadow.ts +24 -7
  63. package/src/index.ts +21 -0
  64. package/src/stories/AppSelect.stories.tsx +44 -0
  65. package/src/stories/FieldValueInput.stories.tsx +6 -3
  66. package/src/stories/FormSelect.stories.tsx +40 -0
  67. package/src/stories/IconfontPicker.stories.tsx +106 -0
  68. package/src/stories/RelationalOperatorSelect.stories.tsx +27 -0
  69. package/src/stories/TeamWideFormSelect.stories.tsx +362 -0
  70. package/src/stories/UserTextMsgBubble.stories.ts +28 -0
  71. package/src/style.css +30 -1
  72. package/style.css +172 -130
@@ -1,6 +1,8 @@
1
1
  import type { Preview } from "@storybook/react-vite";
2
2
 
3
3
  import "../src/style.css";
4
+ // 加载 iconfont(sdk-icon)字体 + .sdk-icon 类,使 FontIcon 字体图标在 storybook 中可渲染
5
+ import "../src/stories/assets/iconfont.css";
4
6
 
5
7
  const preview: Preview = {
6
8
  parameters: {
package/CHANGELOG.md CHANGED
@@ -1,60 +1,229 @@
1
1
  # @baishuyun/ai-design
2
2
 
3
- ## 2.1.0-alpha.4
3
+ ## 2.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: update dep
8
+
9
+ ## 2.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - add missing plugin
14
+
15
+ ## 2.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - tailwindcss-animate 与 tw-animate-css 改为开发依赖。业务侧使用已编译的样式,不再因这两个包的 peer 要求安装 Tailwind。
20
+
21
+ ## 2.1.0
22
+
23
+ ### Minor Changes
24
+
25
+ - MemoizedMarkdown 增加 Prose,按块套用排版。
26
+
27
+ ## 2.0.61
4
28
 
5
29
  ### Patch Changes
6
30
 
7
- - fix skill doc
8
31
  - Updated dependencies
9
- - @baishuyun/ai-feat-utils@2.0.34-alpha.4
10
- - @baishuyun/types@3.1.0-alpha.4
32
+ - @baishuyun/ai-feat-utils@2.0.55
11
33
 
12
- ## 2.1.0-alpha.3
34
+ ## 2.0.60
13
35
 
14
36
  ### Patch Changes
15
37
 
16
- - refactor coze-tools
17
38
  - Updated dependencies
18
- - @baishuyun/ai-feat-utils@2.0.34-alpha.3
19
- - @baishuyun/types@3.1.0-alpha.3
39
+ - @baishuyun/ai-feat-utils@2.0.54
20
40
 
21
- ## 2.1.0-alpha.2
41
+ ## 2.0.59
22
42
 
23
43
  ### Patch Changes
24
44
 
25
- - session
26
45
  - Updated dependencies
27
- - @baishuyun/ai-feat-utils@2.0.34-alpha.2
28
- - @baishuyun/types@3.1.0-alpha.2
46
+ - @baishuyun/ai-feat-utils@2.0.53
29
47
 
30
- ## 2.1.0-alpha.1
48
+ ## 2.0.58
31
49
 
32
50
  ### Patch Changes
33
51
 
34
- - session manager
52
+ - 4b49068: 用户文本气泡超过 200 字可关闭折叠,折叠条图标可隐藏,正文保留换行并解析 Markdown。
53
+
54
+ ## 2.0.57
55
+
56
+ ### Patch Changes
57
+
58
+ - use middleware stackoverflow
35
59
  - Updated dependencies
36
- - @baishuyun/ai-feat-utils@2.0.34-alpha.1
37
- - @baishuyun/types@3.1.0-alpha.1
60
+ - @baishuyun/ai-feat-utils@2.0.52
61
+ - @baishuyun/types@3.0.48
38
62
 
39
- ## 2.1.0-alpha.0
63
+ ## 2.0.56
40
64
 
41
- ### Minor Changes
65
+ ### Patch Changes
66
+
67
+ - bugfi
68
+ - Updated dependencies
69
+ - @baishuyun/ai-feat-utils@2.0.51
70
+ - @baishuyun/types@3.0.47
71
+
72
+ ## 2.0.55
42
73
 
43
- - 8716e65: Upgrade AI SDK from 5.x to 7.x.
74
+ ### Patch Changes
75
+
76
+ - 移动端样式更新
77
+ - Updated dependencies
78
+ - @baishuyun/ai-feat-utils@2.0.50
79
+ - @baishuyun/types@3.0.46
44
80
 
45
- - `ai` -> `^7.0.66`, `@ai-sdk/react` -> `^4.0.69`
46
- - `@ai-sdk/provider` -> `^4.0.7`, `@ai-sdk/provider-utils` -> `^5.0.27`
47
- - `@ai-sdk/deepseek` -> `^3.0.28`
48
- - Remove unused `@ai-sdk/mcp`
49
- - Add `engines.node >= 22`
81
+ ## 2.0.54
50
82
 
51
83
  ### Patch Changes
52
84
 
53
- - add agent
54
- - Updated dependencies [8716e65]
85
+ - bugfix
86
+ - Updated dependencies
87
+ - @baishuyun/ai-feat-utils@2.0.49
88
+ - @baishuyun/types@3.0.45
89
+
90
+ ## 2.0.53
91
+
92
+ ### Patch Changes
93
+
94
+ - fix mobile style
95
+ - Updated dependencies
96
+ - @baishuyun/ai-feat-utils@2.0.48
97
+ - @baishuyun/types@3.0.44
98
+
99
+ ## 2.0.52
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies
104
+ - @baishuyun/types@3.0.43
105
+ - @baishuyun/ai-feat-utils@2.0.47
106
+
107
+ ## 2.0.51
108
+
109
+ ### Patch Changes
110
+
111
+ - fix mobile style
112
+ - Updated dependencies
113
+ - @baishuyun/ai-feat-utils@2.0.46
114
+
115
+ ## 2.0.50
116
+
117
+ ### Patch Changes
118
+
119
+ - agent helper error
120
+ - Updated dependencies
121
+ - @baishuyun/ai-feat-utils@2.0.45
122
+ - @baishuyun/types@3.0.42
123
+
124
+ ## 2.0.49
125
+
126
+ ### Patch Changes
127
+
128
+ - mobile style
129
+ - Updated dependencies
130
+ - @baishuyun/ai-feat-utils@2.0.44
131
+ - @baishuyun/types@3.0.41
132
+
133
+ ## 2.0.48
134
+
135
+ ### Patch Changes
136
+
137
+ - fix style and other bugs
138
+ - Updated dependencies
139
+ - @baishuyun/ai-feat-utils@2.0.43
140
+ - @baishuyun/types@3.0.40
141
+
142
+ ## 2.0.47
143
+
144
+ ### Patch Changes
145
+
146
+ - fix agent helper style
147
+ - Updated dependencies
148
+ - @baishuyun/ai-feat-utils@2.0.42
149
+ - @baishuyun/types@3.0.39
150
+
151
+ ## 2.0.46
152
+
153
+ ### Patch Changes
154
+
155
+ - fix host style overwrite
156
+ - Updated dependencies
157
+ - @baishuyun/ai-feat-utils@2.0.41
158
+ - @baishuyun/types@3.0.38
159
+
160
+ ## 2.0.45
161
+
162
+ ### Patch Changes
163
+
164
+ - fix mask layer
165
+ - Updated dependencies
166
+ - @baishuyun/ai-feat-utils@2.0.40
167
+ - @baishuyun/types@3.0.37
168
+
169
+ ## 2.0.44
170
+
171
+ ### Patch Changes
172
+
173
+ - fix style
174
+ - Updated dependencies
175
+ - @baishuyun/ai-feat-utils@2.0.39
176
+ - @baishuyun/types@3.0.36
177
+
178
+ ## 2.0.43
179
+
180
+ ### Patch Changes
181
+
182
+ - mobile optimization
183
+ - Updated dependencies
184
+ - @baishuyun/ai-feat-utils@2.0.38
185
+ - @baishuyun/types@3.0.35
186
+
187
+ ## 2.0.42
188
+
189
+ ### Patch Changes
190
+
191
+ - mobile update
192
+ - Updated dependencies
193
+ - @baishuyun/ai-feat-utils@2.0.37
194
+ - @baishuyun/types@3.0.34
195
+
196
+ ## 2.0.41
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies
201
+ - @baishuyun/ai-feat-utils@2.0.36
202
+ - @baishuyun/types@3.0.33
203
+
204
+ ## 2.0.40
205
+
206
+ ### Patch Changes
207
+
208
+ - 完善必填校验逻辑
209
+
210
+ ## 2.0.39
211
+
212
+ ### Patch Changes
213
+
214
+ - token usage report
215
+ - Updated dependencies
216
+ - @baishuyun/ai-feat-utils@2.0.35
217
+ - @baishuyun/types@3.0.32
218
+
219
+ ## 2.0.38
220
+
221
+ ### Patch Changes
222
+
223
+ - bugfix
55
224
  - Updated dependencies
56
- - @baishuyun/types@3.1.0-alpha.0
57
- - @baishuyun/ai-feat-utils@2.0.34-alpha.0
225
+ - @baishuyun/ai-feat-utils@2.0.34
226
+ - @baishuyun/types@3.0.31
58
227
 
59
228
  ## 2.0.37
60
229
 
package/package.json CHANGED
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ai-design",
3
- "version": "2.1.0-alpha.4",
4
- "engines": {
5
- "node": ">=22"
6
- },
3
+ "version": "2.1.3",
7
4
  "description": "AI 功能 UI 组件库 - 所有 AI 功能的 UI 表现唯一真相来源",
8
5
  "type": "module",
9
6
  "main": "src/index.ts",
@@ -46,7 +43,7 @@
46
43
  "@radix-ui/react-tabs": "^1.1.14",
47
44
  "@radix-ui/react-tooltip": "^1.2.9",
48
45
  "@tanstack/react-table": "^8.21.3",
49
- "ai": "^7.0.66",
46
+ "ai": "^5.0.101",
50
47
  "class-variance-authority": "^0.7.1",
51
48
  "classnames": "^2.5.1",
52
49
  "clsx": "^2.1.1",
@@ -58,13 +55,12 @@
58
55
  "react-day-picker": "^9.11.2",
59
56
  "react-hook-form": "^7.76.0",
60
57
  "react-markdown": "^10.1.0",
58
+ "remark-breaks": "^4.0.0",
61
59
  "tailwind-merge": "^3.4.0",
62
- "tailwindcss-animate": "^1.0.7",
63
- "tw-animate-css": "^1.4.0",
64
60
  "vaul": "^1.1.2",
65
61
  "zod": "^4.1.13",
66
- "@baishuyun/ai-feat-utils": "2.0.34-alpha.4",
67
- "@baishuyun/types": "3.1.0-alpha.4"
62
+ "@baishuyun/ai-feat-utils": "2.0.55",
63
+ "@baishuyun/types": "3.0.48"
68
64
  },
69
65
  "peerDependencies": {
70
66
  "react": "^19.0.0",
@@ -81,21 +77,25 @@
81
77
  "@types/react": "^19.0.0",
82
78
  "@types/react-dom": "^19.0.0",
83
79
  "@vitejs/plugin-react": "^5.1.1",
80
+ "@tailwindcss/typography": "^0.5.19",
84
81
  "storybook": "^10.1.11",
85
82
  "tailwindcss": "^4.1.17",
83
+ "tailwindcss-animate": "^1.0.7",
84
+ "tw-animate-css": "^1.4.0",
86
85
  "typescript": "^5.5.0",
87
86
  "vite": "^5.1.4",
88
87
  "vite-plugin-dts": "^4.5.4",
89
88
  "@baishuyun/tailwind-config": "3.0.9",
90
- "@baishuyun/types": "3.1.0-alpha.4",
89
+ "@baishuyun/types": "3.0.48",
91
90
  "@baishuyun/typescript-config": "2.0.9"
92
91
  },
93
92
  "keywords": [],
94
93
  "author": "",
95
94
  "license": "ISC",
96
95
  "scripts": {
97
- "build": "vite build && tailwindcss -i src/style.css -o dist/tailwind.css && cat dist/tailwind.css dist/index.css > dist/ai-design.css && node scripts/strip-layers.cjs && cp dist/ai-design.css style.css && rm dist/tailwind.css dist/index.css",
96
+ "build": "vite build && tailwindcss -i src/style.css -o dist/tailwind.css && node scripts/post-build.cjs",
98
97
  "dev": "vite build --watch",
98
+ "dev:build": "vite build --emptyOutDir false",
99
99
  "storybook": "storybook dev -p 6007",
100
100
  "build-storybook": "storybook build"
101
101
  }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * ai-design 构建后处理:跨平台替代 cat / cp / rm。
3
+ * Windows 的 cmd.exe 没有这些 Unix 命令,脚本会在 cat 处失败,
4
+ * 而且失败前 `>` 已把 dist/ai-design.css 截断成 0 字节。
5
+ *
6
+ * 步骤:合并 tailwind CLI 产物与 vite 产物 -> 去 @layer 包裹 -> 拷到包根 style.css -> 清理临时文件。
7
+ */
8
+ const fs = require('node:fs');
9
+ const path = require('node:path');
10
+
11
+ // strip-layers.cjs 内部用相对 cwd 的路径,这里统一锚定到包根
12
+ process.chdir(path.resolve(__dirname, '..'));
13
+
14
+ const DIST = 'dist';
15
+
16
+ // 1. 合并(原:cat dist/tailwind.css dist/index.css > dist/ai-design.css)
17
+ const merged =
18
+ fs.readFileSync(`${DIST}/tailwind.css`, 'utf-8') + fs.readFileSync(`${DIST}/index.css`, 'utf-8');
19
+ fs.writeFileSync(`${DIST}/ai-design.css`, merged);
20
+
21
+ // 2. 去掉 @layer 包裹(复用现有脚本,它在 require 时执行)
22
+ require('./strip-layers.cjs');
23
+
24
+ // 3. 拷到包根(原:cp dist/ai-design.css style.css)
25
+ fs.copyFileSync(`${DIST}/ai-design.css`, 'style.css');
26
+
27
+ // 4. 清理临时文件(原:rm dist/tailwind.css dist/index.css)
28
+ for (const file of ['tailwind.css', 'index.css']) {
29
+ fs.rmSync(`${DIST}/${file}`, { force: true });
30
+ }
31
+
32
+ console.log('ai-design post-build done.');
@@ -0,0 +1,119 @@
1
+ import { useCallback, useState } from 'react';
2
+ import { EnhancedDrawer } from './ui/enhanced-drawer';
3
+ import { AgentSelect } from './agent-select';
4
+ import type { AgentSelectAgent } from './agent-select';
5
+
6
+ export interface AgentDrawerProps {
7
+ agents: Array<AgentSelectAgent>;
8
+ activeAgent?: { id: string } | null;
9
+ onSelect: (agent: AgentSelectAgent) => void | Promise<void>;
10
+ /** 受控开关 */
11
+ open?: boolean;
12
+ /** 非受控默认开关 */
13
+ defaultOpen?: boolean;
14
+ onOpenChange?: (open: boolean) => void;
15
+ showSearch?: boolean;
16
+ /** 触发器(可选;不传则完全由 open 控制) */
17
+ trigger?: React.ReactNode;
18
+ }
19
+
20
+ /** 关闭图标(设计稿 40434:34111,20×20,#121111) */
21
+ const CloseIcon = () => (
22
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true">
23
+ <path
24
+ d="M11.2584 9.99867L17.874 3.37975C18.0348 3.21757 18.125 2.99839 18.125 2.76996C18.125 2.54153 18.0348 2.32235 17.874 2.16017L17.8388 2.12495C17.6764 1.96522 17.4578 1.87572 17.23 1.87572C17.0023 1.87572 16.7837 1.96522 16.6213 2.12495L10.0027 8.75414L3.38708 2.12495C3.22461 1.96478 3.00568 1.875 2.77759 1.875C2.54951 1.875 2.33057 1.96478 2.1681 2.12495L2.13143 2.16017C2.05026 2.23946 1.98576 2.33419 1.94172 2.43878C1.89769 2.54338 1.875 2.65573 1.875 2.76923C1.875 2.88272 1.89769 2.99507 1.94172 3.09967C1.98576 3.20427 2.05026 3.299 2.13143 3.37828L8.74706 9.99867L2.13143 16.6205C1.97109 16.7826 1.88115 17.0015 1.88115 17.2296C1.88115 17.4577 1.97109 17.6765 2.13143 17.8386L2.1681 17.8739C2.33014 18.0343 2.5489 18.1243 2.77686 18.1243C3.00482 18.1243 3.22358 18.0343 3.38561 17.8739L10.0027 11.2549L16.6183 17.8739C16.7804 18.0347 16.9995 18.125 17.2278 18.125C17.4561 18.125 17.6752 18.0347 17.8373 17.8739L17.874 17.8386C18.0343 17.6765 18.1243 17.4577 18.1243 17.2296C18.1243 17.0015 18.0343 16.7826 17.874 16.6205L11.2598 9.99867H11.2584Z"
25
+ fill="#121111"
26
+ />
27
+ </svg>
28
+ );
29
+
30
+ /**
31
+ * 智能体选择抽屉(移动端从底部滑出),复用 AgentSelect 列表,选中后自动关闭。
32
+ * 视觉对齐设计稿 40434:34107:顶部圆角面板 +「全部智能体」18px 标题 +
33
+ * 关闭按钮 + 搜索框 + 全宽列表行。
34
+ * shadow DOM 兼容逻辑统一由 EnhancedDrawer 处理。
35
+ */
36
+ export const AgentDrawer = ({
37
+ agents,
38
+ activeAgent,
39
+ onSelect,
40
+ open: controlledOpen,
41
+ defaultOpen,
42
+ onOpenChange,
43
+ showSearch = true,
44
+ trigger,
45
+ }: AgentDrawerProps) => {
46
+ const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);
47
+ const open = controlledOpen !== undefined ? controlledOpen : internalOpen;
48
+
49
+ const setOpen = useCallback(
50
+ (next: boolean) => {
51
+ if (controlledOpen === undefined) setInternalOpen(next);
52
+ onOpenChange?.(next);
53
+ },
54
+ [controlledOpen, onOpenChange]
55
+ );
56
+
57
+ const handleSelect = useCallback(
58
+ async (agent: AgentSelectAgent) => {
59
+ await onSelect(agent);
60
+ setOpen(false);
61
+ },
62
+ [onSelect, setOpen]
63
+ );
64
+
65
+ return (
66
+ <>
67
+ {trigger && (
68
+ <span onClick={() => setOpen(true)} style={{ display: 'contents' }}>
69
+ {trigger}
70
+ </span>
71
+ )}
72
+ <EnhancedDrawer
73
+ open={open}
74
+ onOpenChange={setOpen}
75
+ direction="bottom"
76
+ title="选择智能体"
77
+ // DrawerContent 内联 style 强制 borderRadius: 0(会压掉方向圆角),
78
+ // 用 !important 任意值恢复设计稿的顶部 10px 圆角
79
+ className="rounded-t-[20px]!"
80
+ >
81
+ <div className="flex flex-col">
82
+ {/* 头部:标题 18px Bold + 关闭(设计稿 40434:34109,上 20、下 20、左右 12) */}
83
+ <div className="flex items-center justify-between px-[12px] pt-[20px] pb-[20px]">
84
+ <span className="text-[18px] font-bold text-[#030303] leading-[normal]">
85
+ 全部智能体
86
+ </span>
87
+ <button
88
+ type="button"
89
+ aria-label="关闭"
90
+ className="shrink-0 size-[20px] border-none bg-transparent p-0 text-[#121111] cursor-pointer"
91
+ onClick={() => setOpen(false)}
92
+ >
93
+ <CloseIcon />
94
+ </button>
95
+ </div>
96
+ {/* 搜索 + 列表(样式见 AgentSelect large;85px ≈ 头部块高度;
97
+ 底部 16px 内边距,设计稿 40654:39900) */}
98
+ <div
99
+ className="overflow-y-auto pb-[16px]"
100
+ style={{
101
+ maxHeight: 'calc(100vh - 52px - 85px)',
102
+ scrollbarWidth: 'none',
103
+ }}
104
+ data-vaul-no-drag
105
+ >
106
+ <AgentSelect
107
+ agents={agents}
108
+ activeAgent={activeAgent}
109
+ onSelect={handleSelect}
110
+ showSearch={showSearch}
111
+ showAllItems
112
+ large
113
+ />
114
+ </div>
115
+ </div>
116
+ </EnhancedDrawer>
117
+ </>
118
+ );
119
+ };
@@ -9,18 +9,13 @@ export interface AgentEntryCardProps {
9
9
  onLogClick: () => void;
10
10
  }
11
11
 
12
- export const AgentEntryCard = ({
13
- agent,
14
- className,
15
- onSelect,
16
- onLogClick: _onLogClick,
17
- }: AgentEntryCardProps) => {
12
+ export const AgentEntryCard = ({ agent, className, onSelect, onLogClick }: AgentEntryCardProps) => {
18
13
  return (
19
14
  <div
20
15
  className={cn(
21
16
  'bg-white border border-[#e0e0e0] border-solid content-stretch flex flex-col items-start p-[16px] rounded-[10px] w-full drop-shadow-[0px_0px_5px_rgba(0,0,0,0.04)] hover:drop-shadow-[0px_0px_8px_rgba(0,0,0,0.1)]',
22
17
  transCls,
23
- className,
18
+ className
24
19
  )}
25
20
 
26
21
  onClick={onSelect}
@@ -32,7 +27,7 @@ export const AgentEntryCard = ({
32
27
  <div className="content-stretch flex gap-[10px] items-center min-w-0">
33
28
  <img
34
29
  alt={agent.name}
35
- className="rounded-[10px] shrink-0 size-[40px] object-cover"
30
+ className="rounded-[20px] shrink-0 size-[40px] object-cover"
36
31
  src={agent.icon}
37
32
  />
38
33
  <p className="font-bold leading-[normal] overflow-hidden shrink-0 text-[#030303] text-[18px] text-ellipsis whitespace-nowrap">
@@ -118,11 +118,11 @@ export const AgentHelperCard = ({
118
118
  )}
119
119
  >
120
120
  {/* Header */}
121
- <div className="grid-rows-[max-content] inline-grid leading-[0] place-items-start shrink-0 w-full">
121
+ <div className="grid-cols-1 grid-rows-[max-content] inline-grid leading-[0] place-items-start shrink-0 w-full">
122
122
  <div className="col-1 content-stretch flex h-[42px] items-center justify-between ml-0 mt-0 px-[12px] row-1 w-full">
123
- <div className="content-stretch flex gap-[6px] items-center shrink-0 min-w-0">
123
+ <div className="content-stretch flex gap-[6px] items-center min-w-0">
124
124
  <TriggerTypeIcon triggerType={helper.triggerType} size={18} />
125
- <p className="leading-[normal] shrink-0 text-[#030303] text-[14px] truncate">
125
+ <p className="leading-[normal] text-[#030303] text-[14px] truncate">
126
126
  {helper.helperName}
127
127
  </p>
128
128
  </div>