@steerable/agent-shell-web 0.6.16 → 0.6.18

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 (50) hide show
  1. package/package.json +9 -11
  2. package/src/brand.test.ts +22 -0
  3. package/src/components/AgentSidebar.test.tsx +791 -0
  4. package/src/components/AgentSidebar.tsx +5 -2
  5. package/src/components/ChatHeader.test.tsx +230 -0
  6. package/src/components/LocalLlmSettingsModal.test.tsx +372 -0
  7. package/src/components/chat/ApprovalModal.test.tsx +83 -0
  8. package/src/components/chat/AskUserModalHost.test.tsx +176 -0
  9. package/src/components/chat/AskUserQuestionMenu.test.tsx +190 -0
  10. package/src/components/chat/AssistantMessage.test.tsx +68 -0
  11. package/src/components/chat/ChatInput.test.tsx +609 -0
  12. package/src/components/chat/ExecPolicyPicker.test.tsx +26 -0
  13. package/src/components/chat/Markdown.test.tsx +170 -0
  14. package/src/components/chat/ModelPicker.test.tsx +149 -0
  15. package/src/components/chat/SessionTreeModal.test.tsx +161 -0
  16. package/src/components/chat/TaskOutcomeCards.test.tsx +97 -0
  17. package/src/components/chat/TaskPanelModal.test.tsx +198 -0
  18. package/src/components/chat/TaskProcessPanel.test.tsx +111 -0
  19. package/src/components/chat/TurnProcessGroup.test.tsx +161 -0
  20. package/src/components/chat/elapsed.test.ts +42 -0
  21. package/src/components/chat/executed-actions-model.test.ts +134 -0
  22. package/src/components/chat/orchestration-children-model.test.ts +115 -0
  23. package/src/components/chat/turn-timeline.test.ts +97 -0
  24. package/src/components/chat/useChatTasks.test.ts +136 -0
  25. package/src/components/settings/AgentsSettingsPanel.test.tsx +229 -0
  26. package/src/components/settings/InsightsSettingsPanel.test.tsx +132 -0
  27. package/src/components/settings/LlmSettingsPanel.test.tsx +461 -0
  28. package/src/components/settings/ModelIdCombobox.test.tsx +88 -0
  29. package/src/components/settings/SecuritySettingsPanel.test.tsx +122 -0
  30. package/src/components/settings/SkillsSettingsPanel.test.tsx +62 -0
  31. package/src/components/settings/WebSearchSettingsPanel.test.tsx +90 -0
  32. package/src/components/settings/compat-flags-model.test.ts +71 -0
  33. package/src/components/settings/llm-vendors.test.ts +171 -0
  34. package/src/components/settings/model-capabilities.test.ts +88 -0
  35. package/src/components/settings/preset-choice-model.test.ts +96 -0
  36. package/src/hooks/useChatsAndAgents.test.ts +165 -0
  37. package/src/lib/attachments.test.ts +127 -0
  38. package/src/lib/chat-title.test.ts +53 -0
  39. package/src/lib/chat-transport.test.ts +277 -0
  40. package/src/lib/date-groups.test.ts +62 -0
  41. package/src/lib/demo-flag.test.ts +17 -0
  42. package/src/lib/electron-bridge.test.ts +54 -0
  43. package/src/lib/exec-policy.test.ts +71 -0
  44. package/src/lib/http-bridge.test.ts +246 -0
  45. package/src/lib/insights.test.ts +56 -0
  46. package/src/lib/local-api.test.ts +353 -0
  47. package/src/lib/pending-first-message.test.ts +17 -0
  48. package/src/lib/slash-sources.test.ts +161 -0
  49. package/src/pages/AgentPage.test.tsx +627 -0
  50. package/src/pages/SettingsPage.test.tsx +102 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steerable/agent-shell-web",
3
- "version": "0.6.16",
3
+ "version": "0.6.18",
4
4
  "type": "module",
5
5
  "description": "Steerable framework — product-neutral renderer SPA source for @steerable/agent-shell (React + Vite). Consumed by product web entry points via the `@/` alias (anchored at this package's src/) and the createProductViteConfig factory. Published as a source package (src/ + vite.base.ts), not a build artifact.",
6
6
  "license": "Apache-2.0",
@@ -19,8 +19,6 @@
19
19
  },
20
20
  "files": [
21
21
  "src",
22
- "!src/**/*.test.ts",
23
- "!src/**/*.test.tsx",
24
22
  "public",
25
23
  "vite.base.ts",
26
24
  "README.md"
@@ -30,8 +28,6 @@
30
28
  "provenance": true
31
29
  },
32
30
  "dependencies": {
33
- "@tailwindcss/vite": "^4.3.0",
34
- "@vitejs/plugin-react": "^4.7.0",
35
31
  "@xterm/addon-fit": "^0.11.0",
36
32
  "@xterm/addon-web-links": "^0.12.0",
37
33
  "@xterm/xterm": "^6.0.0",
@@ -43,19 +39,21 @@
43
39
  "react-router-dom": "^6.30.0",
44
40
  "rehype-raw": "^7.0.0",
45
41
  "remark-gfm": "^4.0.1",
46
- "tailwindcss": "^4.3.0",
47
- "vite": "^5.4.21",
48
- "@steerable/agent-protocol": "0.6.16",
49
- "@steerable/pack-sdk": "0.6.16",
50
- "@steerable/agent-ui": "0.6.16"
42
+ "@steerable/agent-protocol": "0.6.18",
43
+ "@steerable/agent-ui": "0.6.18"
51
44
  },
52
45
  "devDependencies": {
46
+ "@tailwindcss/vite": "^4.3.0",
53
47
  "@testing-library/react": "^16.1.0",
54
48
  "@types/react": "^18.3.12",
55
49
  "@types/react-dom": "^18.3.1",
50
+ "@vitejs/plugin-react": "^4.7.0",
56
51
  "happy-dom": "^15.11.7",
52
+ "tailwindcss": "^4.3.0",
57
53
  "typescript": "^5.8.3",
58
- "vitest": "^3.2.4"
54
+ "vite": "^5.4.21",
55
+ "vitest": "^3.2.4",
56
+ "@steerable/pack-sdk": "0.6.18"
59
57
  },
60
58
  "scripts": {
61
59
  "gen": "echo agent-shell-web",
@@ -0,0 +1,22 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { LOCAL_ASSISTANT_AGENT_ID, pickDefaultAgentId } from './brand';
3
+
4
+ describe('pickDefaultAgentId', () => {
5
+ const catalog = [
6
+ { id: LOCAL_ASSISTANT_AGENT_ID },
7
+ { id: 'data-analyst' },
8
+ { id: 'all-round-assistant' },
9
+ ];
10
+
11
+ it('returns null when the catalog is empty', () => {
12
+ expect(pickDefaultAgentId([])).toBeNull();
13
+ });
14
+
15
+ it('prefers the build-time default (shell: 电脑操作员) even when it is not first', () => {
16
+ expect(pickDefaultAgentId(catalog)).toBe(LOCAL_ASSISTANT_AGENT_ID);
17
+ });
18
+
19
+ it('falls back to the first visible agent when the build default is absent', () => {
20
+ expect(pickDefaultAgentId([{ id: 'writer' }, { id: 'reader' }])).toBe('writer');
21
+ });
22
+ });