@nextclaw/ui 0.14.1-beta.0 → 0.14.1-beta.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/assets/{api-C6EDHBDR.js → api-dQ6uQSZG.js} +3 -3
  3. package/dist/assets/{channels-list-page-DKj6m1Hc.js → channels-list-page-DfpjB8XB.js} +2 -2
  4. package/dist/assets/chat-page-D3QaEqjs.js +105 -0
  5. package/dist/assets/{config-split-page-CjlmJy8X.js → config-split-page-CeFfbaqc.js} +1 -1
  6. package/dist/assets/{confirm-dialog-B39X0pYp.js → confirm-dialog-C95Y4QPC.js} +1 -1
  7. package/dist/assets/{desktop-update-config-DfUQ8nly.js → desktop-update-config-CcK6jiEb.js} +1 -1
  8. package/dist/assets/{dist-CmMro3nV.js → dist-DTGzeil6.js} +1 -1
  9. package/dist/assets/{dist-BIYV2-Ia.js → dist-fGogBmPA.js} +1 -1
  10. package/dist/assets/doc-browser-CuBTcBEZ.js +1 -0
  11. package/dist/assets/{doc-browser-CDtUtcim.js → doc-browser-DVHhEb96.js} +1 -1
  12. package/dist/assets/{doc-browser-context-DZbC9zVB.js → doc-browser-context-BfMXwnrz.js} +1 -1
  13. package/dist/assets/{ellipsis-DDpgTzgx.js → ellipsis-D2F4KMiU.js} +1 -1
  14. package/dist/assets/{external-link-D2cBOCqn.js → external-link-CcgtBK26.js} +1 -1
  15. package/dist/assets/index-ByJCbQqr.css +1 -0
  16. package/dist/assets/index-DjXqiloY.js +103 -0
  17. package/dist/assets/mcp-marketplace-page-98-V__3u.js +1 -0
  18. package/dist/assets/mcp-marketplace-page-BNq_PNmO.js +40 -0
  19. package/dist/assets/model-config-page-aAUkZkSX.js +1 -0
  20. package/dist/assets/plus-1Rxl5FlV.js +1 -0
  21. package/dist/assets/provider-scoped-model-input-we4_Z4gP.js +1 -0
  22. package/dist/assets/providers-config-page-CtMkPSyu.js +1 -0
  23. package/dist/assets/{react-DYQXXGbH.js → react-CTqdhFMk.js} +1 -1
  24. package/dist/assets/remote-fQ7N_r8u.js +1 -0
  25. package/dist/assets/rotate-cw-CzfIeAJj.js +1 -0
  26. package/dist/assets/runtime-config-page-TD1UrTbG.js +1 -0
  27. package/dist/assets/{save-BNVTgBVn.js → save-C9fKWfVB.js} +1 -1
  28. package/dist/assets/{search-CKCzwLId.js → search-D5FQ5q0X.js} +1 -1
  29. package/dist/assets/{search-config-page-DG5Q2hF1.js → search-config-page-AMEJJNIS.js} +1 -1
  30. package/dist/assets/secrets-config-page-CcgJnvBO.js +3 -0
  31. package/dist/assets/{select-CIRwTNP4.js → select-Cu5n0E-3.js} +2 -2
  32. package/dist/assets/{tag-chip-DKhVFtTE.js → tag-chip-C5aOtjxu.js} +1 -1
  33. package/dist/assets/use-config-D8TESeo6.js +1 -0
  34. package/dist/assets/x-1qETdQ70.js +1 -0
  35. package/dist/index.html +14 -14
  36. package/package.json +9 -9
  37. package/src/features/chat/components/conversation/__tests__/chat-conversation-panel.test.tsx +12 -63
  38. package/src/features/chat/components/conversation/chat-conversation-content.tsx +11 -50
  39. package/src/features/chat/components/conversation/chat-conversation-panel.tsx +15 -2
  40. package/src/features/chat/features/input/components/chat-input-bar.container.tsx +84 -6
  41. package/src/features/chat/features/input/hooks/use-chat-input-bar-query-state.ts +2 -0
  42. package/src/features/chat/features/input/hooks/use-chat-model-favorites.ts +87 -0
  43. package/src/features/chat/features/input/utils/__tests__/chat-input-bar.utils.test.ts +64 -24
  44. package/src/features/chat/features/input/utils/__tests__/ncp-chat-input-availability.utils.test.ts +1 -0
  45. package/src/features/chat/features/input/utils/chat-input-bar.utils.ts +21 -12
  46. package/src/features/chat/features/input/utils/chat-input-toolbar.utils.ts +80 -25
  47. package/src/features/chat/features/message/utils/__tests__/chat-message-file-operation.utils.test.ts +310 -0
  48. package/src/features/chat/features/message/utils/__tests__/chat-message-test.utils.ts +43 -0
  49. package/src/features/chat/features/message/utils/__tests__/chat-message.utils.test.ts +1 -346
  50. package/src/features/chat/features/message/utils/chat-message-tool-card.utils.ts +10 -9
  51. package/src/features/chat/features/message/utils/file-operation/diff.utils.ts +39 -36
  52. package/src/features/chat/features/message/utils/file-operation/line-builder.utils.ts +46 -38
  53. package/src/features/chat/features/message/utils/file-operation/parsed-block.utils.ts +18 -15
  54. package/src/features/chat/features/session/components/session-header/__tests__/chat-session-project-badge.test.tsx +25 -25
  55. package/src/features/chat/features/session/components/session-header/chat-session-project-badge.tsx +15 -2
  56. package/src/features/chat/features/session-type/components/__tests__/chat-sidebar-create-menu.test.tsx +24 -0
  57. package/src/features/chat/features/session-type/components/chat-sidebar-create-menu.tsx +10 -1
  58. package/src/features/chat/features/welcome/components/__tests__/chat-conversation-welcome.test.tsx +193 -0
  59. package/src/features/chat/features/welcome/components/__tests__/chat-welcome.test.tsx +123 -0
  60. package/src/features/chat/features/welcome/components/chat-conversation-welcome.tsx +104 -0
  61. package/src/features/chat/features/welcome/components/chat-welcome-agent-picker.tsx +72 -0
  62. package/src/features/chat/features/welcome/components/chat-welcome-capability-grid.tsx +54 -0
  63. package/src/features/chat/features/welcome/components/chat-welcome-project-picker.tsx +132 -0
  64. package/src/features/chat/features/welcome/components/chat-welcome-session-type-picker.tsx +82 -0
  65. package/src/features/chat/features/welcome/components/chat-welcome.tsx +121 -0
  66. package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-project-options.utils.test.ts +53 -0
  67. package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-selection.utils.test.ts +63 -0
  68. package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-visibility.utils.test.ts +34 -0
  69. package/src/features/chat/features/welcome/utils/chat-welcome-project-options.utils.ts +71 -0
  70. package/src/features/chat/features/welcome/utils/chat-welcome-selection.utils.ts +79 -0
  71. package/src/features/chat/features/welcome/utils/chat-welcome-visibility.utils.ts +17 -0
  72. package/src/features/chat/managers/__tests__/chat-input.manager.test.ts +65 -0
  73. package/src/features/chat/managers/chat-input.manager.ts +24 -2
  74. package/src/features/chat/stores/chat-input.store.ts +2 -0
  75. package/src/features/chat/types/chat-input-bar.types.ts +5 -0
  76. package/src/features/marketplace/utils/marketplace-installed-cache.utils.ts +27 -23
  77. package/src/features/settings/components/config/provider-form.tsx +284 -387
  78. package/src/features/settings/components/config/provider-status-badge.tsx +4 -4
  79. package/src/features/settings/components/config/secrets-config-form.tsx +11 -135
  80. package/src/features/settings/hooks/use-provider-auth-flow.ts +140 -0
  81. package/src/features/settings/pages/__tests__/model-config-page.test.tsx +16 -0
  82. package/src/features/settings/pages/secrets-config-page.tsx +2 -1
  83. package/src/features/settings/utils/__tests__/provider-form-support.utils.test.ts +60 -1
  84. package/src/features/settings/utils/__tests__/secrets-config-form.utils.test.ts +66 -0
  85. package/src/features/settings/utils/provider-form-context.utils.ts +131 -0
  86. package/src/features/settings/utils/provider-form-model.utils.ts +101 -0
  87. package/src/features/settings/utils/provider-form-support.utils.ts +102 -1
  88. package/src/features/settings/utils/secrets-config-form.utils.ts +139 -0
  89. package/src/features/system-status/components/config/runtime-agent-list-card.tsx +17 -11
  90. package/src/features/system-status/components/config/runtime-binding-list-card.tsx +14 -9
  91. package/src/features/system-status/components/config/runtime-config-editor.tsx +8 -5
  92. package/src/features/system-status/components/config/runtime-entry-list-card.tsx +14 -9
  93. package/src/features/system-status/components/config/runtime-settings-card.tsx +16 -7
  94. package/src/features/system-status/components/runtime-security-card.tsx +79 -25
  95. package/src/shared/components/common/__tests__/searchable-model-input.test.tsx +34 -0
  96. package/src/shared/components/common/provider-scoped-model-input.tsx +1 -0
  97. package/src/shared/components/common/searchable-model-input.tsx +102 -87
  98. package/src/shared/components/ui/README.md +7 -0
  99. package/src/shared/components/ui/popover.tsx +19 -3
  100. package/src/shared/components/ui/select.tsx +14 -4
  101. package/src/shared/hooks/use-infinite-scroll-loader.ts +14 -10
  102. package/src/shared/lib/api/index.ts +2 -0
  103. package/src/shared/lib/api/preferences/preference.types.ts +22 -0
  104. package/src/shared/lib/api/preferences/preference.utils.ts +40 -0
  105. package/src/shared/lib/i18n/locales/en-US/chat.json +16 -1
  106. package/src/shared/lib/i18n/locales/en-US/core.json +1 -0
  107. package/src/shared/lib/i18n/locales/zh-CN/chat.json +16 -1
  108. package/src/shared/lib/i18n/locales/zh-CN/core.json +1 -0
  109. package/dist/assets/chat-page-BXngLJY6.js +0 -105
  110. package/dist/assets/doc-browser-B6Wc_TIY.js +0 -1
  111. package/dist/assets/index-DTb_XVIH.js +0 -103
  112. package/dist/assets/index-ayiPYhf1.css +0 -1
  113. package/dist/assets/mcp-marketplace-page-DZ9H0v05.js +0 -1
  114. package/dist/assets/mcp-marketplace-page-cnVWf7QQ.js +0 -40
  115. package/dist/assets/model-config-page-Bcb35AVv.js +0 -1
  116. package/dist/assets/plus-CYE1onU2.js +0 -1
  117. package/dist/assets/provider-scoped-model-input-kdoNp4HG.js +0 -1
  118. package/dist/assets/providers-config-page-CQSibSwO.js +0 -1
  119. package/dist/assets/remote-BlJDbXOI.js +0 -1
  120. package/dist/assets/rotate-cw-BWbvFDAX.js +0 -1
  121. package/dist/assets/runtime-config-page-Tn2yLQ0c.js +0 -1
  122. package/dist/assets/secrets-config-page-BXn5Uuwp.js +0 -3
  123. package/dist/assets/use-config-DgKM9VIU.js +0 -1
  124. package/dist/assets/x-Cm3JjYut.js +0 -1
  125. package/src/features/chat/components/__tests__/chat-welcome.test.tsx +0 -45
  126. package/src/features/chat/components/chat-welcome.tsx +0 -102
@@ -1,102 +0,0 @@
1
- import type { AgentProfileView } from '@/shared/lib/api';
2
- import { AgentAvatar } from '@/shared/components/common/agent-avatar';
3
- import { Select, SelectContent, SelectItem, SelectTrigger } from '@/shared/components/ui/select';
4
- import { t } from '@/shared/lib/i18n';
5
- import { Bot, BrainCircuit, AlarmClock, MessageCircle } from 'lucide-react';
6
-
7
- type ChatWelcomeProps = { onCreateSession: () => void; agents: AgentProfileView[]; selectedAgentId: string; onSelectAgent: (agentId: string) => void };
8
-
9
- const capabilities = [
10
- {
11
- icon: MessageCircle,
12
- titleKey: 'chatWelcomeCapability1Title' as const,
13
- descKey: 'chatWelcomeCapability1Desc' as const,
14
- },
15
- {
16
- icon: BrainCircuit,
17
- titleKey: 'chatWelcomeCapability2Title' as const,
18
- descKey: 'chatWelcomeCapability2Desc' as const,
19
- },
20
- {
21
- icon: AlarmClock,
22
- titleKey: 'chatWelcomeCapability3Title' as const,
23
- descKey: 'chatWelcomeCapability3Desc' as const,
24
- },
25
- ];
26
-
27
- export function ChatWelcome({ onCreateSession, agents, selectedAgentId, onSelectAgent }: ChatWelcomeProps) {
28
- const selectedAgent = agents.find((agent) => agent.id === selectedAgentId) ?? null;
29
-
30
- return (
31
- <div className="min-h-full flex items-center justify-center px-4 py-6 sm:p-8">
32
- <div className="max-w-lg w-full min-w-0 text-center">
33
- <div className="mx-auto mb-6 h-16 w-16 rounded-2xl bg-primary/10 flex items-center justify-center">
34
- <Bot className="h-8 w-8 text-primary" />
35
- </div>
36
-
37
- <h2 className="text-xl font-semibold text-gray-900 mb-2">{t('chatWelcomeTitle')}</h2>
38
- <p className="text-sm text-gray-500 mb-8">{t('chatWelcomeSubtitle')}</p>
39
-
40
- <div className="mb-6 flex items-center justify-center gap-2.5">
41
- <span className="text-[13px] font-medium text-gray-500">
42
- {t('chatDraftAgentTitle')}
43
- </span>
44
- <Select value={selectedAgentId} onValueChange={onSelectAgent}>
45
- <SelectTrigger
46
- aria-label={t('chatDraftAgentTitle')}
47
- className="h-auto w-auto gap-1 rounded-full border-0 bg-transparent px-1.5 py-1 text-gray-500 shadow-none hover:bg-white/70 hover:text-gray-800 focus:ring-0"
48
- >
49
- <span className="sr-only">{t('chatDraftAgentTitle')}</span>
50
- <div className="flex items-center gap-1.5">
51
- {selectedAgent ? (
52
- <AgentAvatar
53
- agentId={selectedAgent.id}
54
- displayName={selectedAgent.displayName}
55
- avatarUrl={selectedAgent.avatarUrl}
56
- className="h-7 w-7 shrink-0"
57
- />
58
- ) : null}
59
- </div>
60
- </SelectTrigger>
61
- <SelectContent className="rounded-xl border-gray-200/80 shadow-lg">
62
- {agents.map((agent) => (
63
- <SelectItem key={agent.id} value={agent.id} className="rounded-lg pr-10">
64
- <div className="flex min-w-0 items-center gap-2">
65
- <AgentAvatar
66
- agentId={agent.id}
67
- displayName={agent.displayName}
68
- avatarUrl={agent.avatarUrl}
69
- className="h-5 w-5 shrink-0"
70
- />
71
- <span className="truncate text-sm font-medium text-gray-700">
72
- {agent.displayName?.trim() || agent.id}
73
- </span>
74
- </div>
75
- </SelectItem>
76
- ))}
77
- </SelectContent>
78
- </Select>
79
- </div>
80
-
81
- <div className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,9.5rem),1fr))] gap-3">
82
- {capabilities.map((cap) => {
83
- const Icon = cap.icon;
84
- return (
85
- <button
86
- key={cap.titleKey}
87
- onClick={onCreateSession}
88
- className="min-w-0 rounded-2xl border border-gray-200 bg-white p-3 text-left shadow-card hover:shadow-card-hover transition-shadow cursor-pointer sm:p-4"
89
- >
90
- <div className="h-9 w-9 rounded-xl bg-primary/8 flex items-center justify-center mb-3">
91
- <Icon className="h-4.5 w-4.5 text-primary" />
92
- </div>
93
- <div className="text-sm font-semibold text-gray-900 mb-1">{t(cap.titleKey)}</div>
94
- <div className="text-[11px] text-gray-500 leading-relaxed">{t(cap.descKey)}</div>
95
- </button>
96
- );
97
- })}
98
- </div>
99
- </div>
100
- </div>
101
- );
102
- }