vpschatbotwidget 1.1.0 → 1.2.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 (31) hide show
  1. package/dist-lib/types/chatbot/api/chatbot-api.d.ts +7 -4
  2. package/dist-lib/types/chatbot/api/chatbot-api.test.d.ts +1 -0
  3. package/dist-lib/types/chatbot/api/chatbot-types.d.ts +14 -0
  4. package/dist-lib/types/chatbot/core/AgentReasoning.d.ts +0 -1
  5. package/dist-lib/types/chatbot/core/ChatContext.d.ts +4 -1
  6. package/dist-lib/types/chatbot/core/ChatMarkdown.d.ts +2 -1
  7. package/dist-lib/types/chatbot/core/ChatProvider.d.ts +2 -0
  8. package/dist-lib/types/chatbot/core/grounding.test.d.ts +1 -0
  9. package/dist-lib/types/chatbot/embedded/EmbeddedChatbot.d.ts +1 -0
  10. package/dist-lib/types/chatbot/index.d.ts +1 -1
  11. package/dist-lib/types/chatbot/widget/ChatbotWidget.d.ts +1 -0
  12. package/dist-lib/vps-chatbot.cjs +53 -24
  13. package/dist-lib/vps-chatbot.js +1181 -840
  14. package/package.json +1 -1
  15. package/src/chatbot/api/chatbot-api.test.ts +48 -0
  16. package/src/chatbot/api/chatbot-api.ts +141 -49
  17. package/src/chatbot/api/chatbot-types.ts +16 -0
  18. package/src/chatbot/chatbot.test.tsx +24 -1
  19. package/src/chatbot/core/AgentReasoning.tsx +28 -23
  20. package/src/chatbot/core/ChatContext.tsx +4 -0
  21. package/src/chatbot/core/ChatInput.tsx +14 -1
  22. package/src/chatbot/core/ChatMarkdown.tsx +12 -3
  23. package/src/chatbot/core/ChatMessage.tsx +16 -4
  24. package/src/chatbot/core/ChatProvider.tsx +84 -15
  25. package/src/chatbot/core/ChatTypingIndicator.tsx +2 -7
  26. package/src/chatbot/core/GroundedSources.tsx +4 -6
  27. package/src/chatbot/core/grounding.test.tsx +21 -0
  28. package/src/chatbot/embedded/EmbeddedChatbot.tsx +4 -1
  29. package/src/chatbot/index.ts +2 -0
  30. package/src/chatbot/widget/ChatbotWidget.tsx +4 -1
  31. package/src/index.css +38 -162
@@ -4,6 +4,7 @@ import type {
4
4
  ChatMessage,
5
5
  ChatUserContext,
6
6
  Suggestion,
7
+ ModelOption,
7
8
  } from "../api/chatbot-types";
8
9
  import { DEFAULT_SUGGESTIONS } from "../config/suggestions";
9
10
  import { ChatContext, type ChatUiStatus } from "./ChatContext";
@@ -34,6 +35,8 @@ export interface ChatProviderProps {
34
35
  hideInspectSources?: boolean;
35
36
  /** Whether to render grounded sources (default: true) */
36
37
  showGroundedSources?: boolean;
38
+ /** Configured model alias, or auto for server-side routing. */
39
+ modelId?: string;
37
40
  }
38
41
 
39
42
  const DEFAULT_WELCOME_TEXT = `Hello! I am your **VPS Veritas assistant**.
@@ -77,6 +80,7 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
77
80
  api,
78
81
  hideInspectSources = false,
79
82
  showGroundedSources = true,
83
+ modelId = "auto",
80
84
  }) => {
81
85
  const resolvedBaseUrl = apiBaseUrl ?? apiUrl ?? proxyUrl;
82
86
  const client = useMemo(
@@ -112,17 +116,50 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
112
116
  const [error, setError] = useState<string | null>(null);
113
117
  const lastUserTextRef = useRef<string | null>(null);
114
118
  const initialSentRef = useRef(false);
119
+ const activeRequest = useRef<AbortController | null>(null);
120
+ const busyRef = useRef(false);
121
+ const [models, setModels] = useState<ModelOption[]>([]);
122
+ const [selectedModelId, setSelectedModelId] = useState(modelId);
115
123
 
116
- const ensureSession = useCallback(async (): Promise<string> => {
124
+ React.useEffect(() => setSelectedModelId(modelId), [modelId]);
125
+ React.useEffect(() => {
126
+ let active = true;
127
+ setModels([]);
128
+ void client.listModels?.().then((catalog) => {
129
+ if (active) setModels(catalog?.models || []);
130
+ }).catch(() => {});
131
+ return () => { active = false; };
132
+ }, [client]);
133
+
134
+ const selectModel = useCallback((next: string) => {
135
+ if (!busyRef.current && (next === "auto" || models.some((m) => m.id === next && m.configured))) {
136
+ setSelectedModelId(next);
137
+ }
138
+ }, [models]);
139
+
140
+ React.useEffect(() => () => activeRequest.current?.abort(), []);
141
+
142
+ const ensureSession = useCallback(async (signal: AbortSignal): Promise<string> => {
117
143
  if (sessionId) return sessionId;
118
144
  setStatus("connecting");
119
- const created = await client.createSession();
145
+ const created = await client.createSession(signal);
146
+ if (signal.aborted) throw new DOMException("Aborted", "AbortError");
120
147
  setSessionId(created.sessionId);
121
148
  return created.sessionId;
122
149
  }, [sessionId, client]);
123
150
 
124
151
  const sendToBackend = useCallback(
125
152
  async (text: string) => {
153
+ if (busyRef.current) return;
154
+ busyRef.current = true;
155
+ const controller = new AbortController();
156
+ activeRequest.current = controller;
157
+ let frame: number | undefined;
158
+ let pendingText = "";
159
+ const cancelFrame = () => {
160
+ if (frame !== undefined) cancelAnimationFrame(frame);
161
+ frame = undefined;
162
+ };
126
163
  lastUserTextRef.current = text;
127
164
  const userMessage: ChatMessage = {
128
165
  id: newId("user"),
@@ -138,14 +175,16 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
138
175
  content: "",
139
176
  createdAt: new Date().toISOString(),
140
177
  status: "pending",
141
- progressText: "Analyzing question & expanding domain terms ",
178
+ progressText: "Preparing your answer…",
142
179
  };
180
+ const requestStartedAt = performance.now();
143
181
 
144
182
  setMessages((prev) => [...prev, userMessage, pendingAssistant]);
145
183
  setStatus("awaiting");
146
184
  setError(null);
147
185
 
148
186
  const updateProgress = (stageText: string) => {
187
+ if (controller.signal.aborted) return;
149
188
  setMessages((prev) =>
150
189
  prev.map((message) =>
151
190
  message.id === pendingId
@@ -155,10 +194,8 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
155
194
  );
156
195
  };
157
196
 
158
-
159
-
160
197
  try {
161
- const currentSession = await ensureSession();
198
+ const currentSession = await ensureSession(controller.signal);
162
199
  const response = client.sendMessageStream
163
200
  ? await client.sendMessageStream(
164
201
  currentSession,
@@ -166,16 +203,28 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
166
203
  {
167
204
  roleId: effectiveUserContext.roleId,
168
205
  client: effectiveUserContext.client,
206
+ modelId: selectedModelId,
169
207
  },
170
- (liveStage) => {
171
-
172
- updateProgress(liveStage);
173
- }
208
+ updateProgress,
209
+ (token) => {
210
+ if (controller.signal.aborted) return;
211
+ pendingText += token;
212
+ if (frame === undefined) frame = requestAnimationFrame(() => {
213
+ frame = undefined;
214
+ if (!controller.signal.aborted) setMessages((prev) => prev.map((message) =>
215
+ message.id === pendingId ? { ...message, content: pendingText } : message));
216
+ });
217
+ },
218
+ controller.signal
174
219
  )
175
220
  : await client.sendMessage(currentSession, text, {
176
221
  roleId: effectiveUserContext.roleId,
177
222
  client: effectiveUserContext.client,
178
- });
223
+ modelId: selectedModelId,
224
+ }, controller.signal);
225
+
226
+ cancelFrame();
227
+ if (controller.signal.aborted) return;
179
228
 
180
229
  setMessages((prev) =>
181
230
  prev.map((message) =>
@@ -189,12 +238,18 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
189
238
  sources: response.sources,
190
239
  toolCalls: response.toolCalls,
191
240
  usage: response.usage,
241
+ durationMs: Math.max(
242
+ Math.round(performance.now() - requestStartedAt),
243
+ response.durationMs ?? 0
244
+ ),
192
245
  }
193
246
  : message
194
247
  )
195
248
  );
196
249
  setStatus("idle");
197
250
  } catch (err) {
251
+ cancelFrame();
252
+ if (controller.signal.aborted) return;
198
253
  const message = friendlyError(err);
199
254
  setMessages((prev) =>
200
255
  prev.map((item) =>
@@ -205,9 +260,15 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
205
260
  );
206
261
  setError(message);
207
262
  setStatus("error");
263
+ } finally {
264
+ cancelFrame();
265
+ if (activeRequest.current === controller) {
266
+ activeRequest.current = null;
267
+ busyRef.current = false;
268
+ }
208
269
  }
209
270
  },
210
- [ensureSession, client, effectiveUserContext.client, effectiveUserContext.roleId]
271
+ [ensureSession, client, effectiveUserContext.client, effectiveUserContext.roleId, selectedModelId]
211
272
  );
212
273
 
213
274
  const sendMessage = useCallback(
@@ -220,6 +281,7 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
220
281
  );
221
282
 
222
283
  const retryLast = useCallback(async () => {
284
+ if (busyRef.current) return;
223
285
  const last = lastUserTextRef.current;
224
286
  if (!last) return;
225
287
  setMessages((prev) => prev.filter((message) => message.status !== "error"));
@@ -230,14 +292,15 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
230
292
  const cancelTicket = useCallback(() => { }, []);
231
293
 
232
294
  const resetConversation = useCallback(async () => {
233
- if (sessionId) {
234
- await client.closeSession(sessionId);
235
- }
295
+ activeRequest.current?.abort();
296
+ activeRequest.current = null;
297
+ busyRef.current = false;
236
298
  setSessionId(null);
237
299
  setMessages(defaultWelcomeMsg ? [defaultWelcomeMsg] : []);
238
300
  setStatus("idle");
239
301
  setError(null);
240
302
  lastUserTextRef.current = null;
303
+ if (sessionId) await client.closeSession(sessionId);
241
304
  }, [sessionId, client, defaultWelcomeMsg]);
242
305
 
243
306
  React.useEffect(() => {
@@ -270,6 +333,9 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
270
333
  confirmTicket,
271
334
  cancelTicket,
272
335
  resetConversation,
336
+ models,
337
+ selectedModelId,
338
+ selectModel,
273
339
  }),
274
340
  [
275
341
  messages,
@@ -287,6 +353,9 @@ export const ChatProvider: React.FC<ChatProviderProps> = ({
287
353
  confirmTicket,
288
354
  cancelTicket,
289
355
  resetConversation,
356
+ models,
357
+ selectedModelId,
358
+ selectModel,
290
359
  ]
291
360
  );
292
361
 
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { Sparkles } from "lucide-react";
3
2
  import { cn } from "../../lib/cn";
4
3
 
5
4
  export const ChatTypingIndicator: React.FC<{
@@ -12,16 +11,12 @@ export const ChatTypingIndicator: React.FC<{
12
11
  role="status"
13
12
  aria-label="Assistant is preparing a reply"
14
13
  >
15
- {/* <div className="typing-indicator">
14
+ <div className="typing-indicator" aria-hidden="true">
16
15
  <span className="typing-dot" />
17
16
  <span className="typing-dot" />
18
17
  <span className="typing-dot" />
19
- </div> */}
20
- <div className="typing-progress-pill">
21
- <span className="typing-progress-text">
22
- {text || "Retrieving knowledge & generating answer ..."}
23
- </span>
24
18
  </div>
19
+ {text && <div className="typing-progress-pill">{text}</div>}
25
20
  </div>
26
21
  );
27
22
  };
@@ -83,7 +83,7 @@ export const GroundedSources: React.FC<GroundedSourcesProps> = ({
83
83
  <div className="grounded-sources-header">
84
84
  <div className="grounded-sources-badge">
85
85
  <ShieldCheck size={13} className="grounded-shield-icon" />
86
- <span>Grounded in {topSources.length} Verified VPS Sources</span>
86
+ <span>{topSources.length} retrieved VPS sources</span>
87
87
  </div>
88
88
  {!shouldHideInspect && (
89
89
  <button
@@ -101,7 +101,6 @@ export const GroundedSources: React.FC<GroundedSourcesProps> = ({
101
101
  <div className="grounded-pills-row">
102
102
  {topSources.map((source, idx) => {
103
103
  const title = formatDocTitle(source);
104
- const scorePct = Math.round(source.score * 100);
105
104
  const isSelected = activeSnippetIdx === idx;
106
105
 
107
106
  return (
@@ -118,8 +117,8 @@ export const GroundedSources: React.FC<GroundedSourcesProps> = ({
118
117
  title={source.source}
119
118
  >
120
119
  <BookOpen size={11} className="grounded-book-icon" />
121
- <span className="grounded-pill-title">{title}</span>
122
- <span className="grounded-pill-score">{scorePct}% match</span>
120
+ <span className="grounded-pill-title">[S{idx + 1}] {title}</span>
121
+ <span className="grounded-pill-score" title="Ranking score, not a probability of correctness">Score {source.score.toFixed(2)}</span>
123
122
  </button>
124
123
  );
125
124
  })}
@@ -129,7 +128,6 @@ export const GroundedSources: React.FC<GroundedSourcesProps> = ({
129
128
  <div className="grounded-sources-details-list">
130
129
  {topSources.map((source, idx) => {
131
130
  const title = formatDocTitle(source);
132
- const scorePct = Math.round(source.score * 100);
133
131
  const routeHint = getRouteHint(source.source);
134
132
  const isHighlighted = activeSnippetIdx === idx;
135
133
 
@@ -144,7 +142,7 @@ export const GroundedSources: React.FC<GroundedSourcesProps> = ({
144
142
  <span className="grounded-detail-title">{title}</span>
145
143
  </div>
146
144
  <div className="grounded-detail-meta">
147
- <span className="grounded-detail-score">{scorePct}% Match</span>
145
+ <span className="grounded-detail-score">Rank score {source.score.toFixed(2)}</span>
148
146
  {routeHint && (
149
147
  <a
150
148
  href={routeHint.path}
@@ -0,0 +1,21 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import { describe, expect, it } from "vitest";
3
+ import { ChatMarkdown } from "./ChatMarkdown";
4
+ import { ChatMessageBubble } from "./ChatMessage";
5
+
6
+ describe("grounded answer rendering", () => {
7
+ it("does not render executable markdown links", () => {
8
+ render(<ChatMarkdown text="[Bad](javascript:alert) [Unsafe](data:text/html,evil) [Portal](/dashboard/reports)" />);
9
+ expect(screen.queryByRole("link", { name: "Bad" })).toBeNull();
10
+ expect(screen.queryByRole("link", { name: "Unsafe" })).toBeNull();
11
+ expect(screen.getByRole("link", { name: "Portal" })).toHaveAttribute("href", "/dashboard/reports");
12
+ });
13
+
14
+ it("shows sources without claiming a probability or verification", () => {
15
+ render(<ChatMessageBubble message={{ id: "reply", role: "assistant", content: "Fuel reports [S1]", createdAt: "2026-01-01", status: "complete",
16
+ sources: [{ chunkId: "c", source: "knowledge/Web/Reports-Fuel.md", score: 0.65 }] }} />);
17
+ expect(screen.getByText("1 retrieved VPS sources")).toBeInTheDocument();
18
+ expect(screen.queryByText(/Verified|65%/i)).toBeNull();
19
+ expect(screen.getByText(/\[S1\] Reports Fuel/)).toBeInTheDocument();
20
+ });
21
+ });
@@ -41,6 +41,7 @@ export interface EmbeddedChatbotProps {
41
41
  hideInspectSources?: boolean;
42
42
  /** Whether to show grounded sources (default: true) */
43
43
  showGroundedSources?: boolean;
44
+ modelId?: string;
44
45
  }
45
46
 
46
47
  const EmbeddedChatbotView: React.FC<Omit<
@@ -93,6 +94,7 @@ export const EmbeddedChatbot: React.FC<EmbeddedChatbotProps> = ({
93
94
  initialMessage,
94
95
  hideInspectSources,
95
96
  showGroundedSources,
97
+ modelId,
96
98
  ...viewProps
97
99
  }) => {
98
100
  const existingContext = useOptionalChatContext();
@@ -110,7 +112,7 @@ export const EmbeddedChatbot: React.FC<EmbeddedChatbotProps> = ({
110
112
  disableSuggestions === undefined &&
111
113
  !initialMessage &&
112
114
  hideInspectSources === undefined &&
113
- showGroundedSources === undefined;
115
+ showGroundedSources === undefined && modelId === undefined;
114
116
 
115
117
  if (canReuseContext) {
116
118
  return <EmbeddedChatbotView {...viewProps} />;
@@ -129,6 +131,7 @@ export const EmbeddedChatbot: React.FC<EmbeddedChatbotProps> = ({
129
131
  initialMessage={initialMessage}
130
132
  hideInspectSources={hideInspectSources}
131
133
  showGroundedSources={showGroundedSources}
134
+ modelId={modelId}
132
135
  >
133
136
  <EmbeddedChatbotView {...viewProps} />
134
137
  </ChatProvider>
@@ -23,6 +23,8 @@ export type {
23
23
  TokenUsage,
24
24
  ChatRole,
25
25
  MessageStatus,
26
+ ModelOption,
27
+ ModelCatalog,
26
28
  } from "./api/chatbot-types";
27
29
  export type { EnvStage } from "../components/EnvBadge";
28
30
 
@@ -41,6 +41,7 @@ export interface ChatbotWidgetProps {
41
41
  hideInspectSources?: boolean;
42
42
  /** Whether to show grounded sources (default: true) */
43
43
  showGroundedSources?: boolean;
44
+ modelId?: string;
44
45
  }
45
46
 
46
47
  const ChatbotWidgetView: React.FC<Omit<
@@ -90,6 +91,7 @@ export const ChatbotWidget: React.FC<ChatbotWidgetProps> = ({
90
91
  initialMessage,
91
92
  hideInspectSources,
92
93
  showGroundedSources,
94
+ modelId,
93
95
  ...viewProps
94
96
  }) => {
95
97
  const existingContext = useOptionalChatContext();
@@ -107,7 +109,7 @@ export const ChatbotWidget: React.FC<ChatbotWidgetProps> = ({
107
109
  disableSuggestions === undefined &&
108
110
  !initialMessage &&
109
111
  hideInspectSources === undefined &&
110
- showGroundedSources === undefined;
112
+ showGroundedSources === undefined && modelId === undefined;
111
113
 
112
114
  if (canReuseContext) {
113
115
  return <ChatbotWidgetView {...viewProps} />;
@@ -126,6 +128,7 @@ export const ChatbotWidget: React.FC<ChatbotWidgetProps> = ({
126
128
  initialMessage={initialMessage}
127
129
  hideInspectSources={hideInspectSources}
128
130
  showGroundedSources={showGroundedSources}
131
+ modelId={modelId}
129
132
  >
130
133
  <ChatbotWidgetView {...viewProps} />
131
134
  </ChatProvider>
package/src/index.css CHANGED
@@ -899,6 +899,26 @@ button {
899
899
  color: var(--text-subtle);
900
900
  }
901
901
 
902
+ .chat-model-picker {
903
+ display: flex;
904
+ align-items: center;
905
+ gap: 8px;
906
+ padding-top: 8px;
907
+ font-size: 12px;
908
+ color: var(--text-secondary, #64748b);
909
+ }
910
+
911
+ .chat-model-picker select {
912
+ min-width: 0;
913
+ max-width: 180px;
914
+ padding: 4px 8px;
915
+ border: 1px solid var(--border-color, #cbd5e1);
916
+ border-radius: 6px;
917
+ background: var(--bg-primary, #fff);
918
+ color: inherit;
919
+ font: inherit;
920
+ }
921
+
902
922
  .chat-input-footer-brand {
903
923
  color: var(--primary);
904
924
  font-weight: 700;
@@ -1806,7 +1826,13 @@ button {
1806
1826
  transform: rotate(180deg);
1807
1827
  }
1808
1828
 
1809
- /* ── AgentReasoning (ChatGPT / Open WebUI style thinking) ───────── */
1829
+ /* ── Live response progress and timing ────────────────────────── */
1830
+ .msg-streaming-text {
1831
+ white-space: pre-wrap;
1832
+ overflow-wrap: anywhere;
1833
+ line-height: 1.55;
1834
+ }
1835
+
1810
1836
  .agent-reasoning-container {
1811
1837
  margin-bottom: 8px;
1812
1838
  font-family: var(--font-main);
@@ -1824,21 +1850,15 @@ button {
1824
1850
  font-family: var(--font-main);
1825
1851
  font-size: 11.5px;
1826
1852
  font-weight: 500;
1827
- cursor: pointer;
1853
+ cursor: default;
1828
1854
  user-select: none;
1829
1855
  transition: all 0.15s ease;
1830
1856
  }
1831
1857
 
1832
- .agent-reasoning-header:hover {
1833
- background: var(--dark-blue-100);
1834
- border-color: var(--dark-blue-200);
1835
- color: var(--vps-dark-blue);
1836
- }
1837
-
1838
1858
  .agent-reasoning--active .agent-reasoning-header {
1839
- background: var(--orange-50);
1840
- border-color: var(--orange-100);
1841
- color: var(--vps-orange);
1859
+ background: var(--dark-blue-50);
1860
+ border-color: var(--dark-blue-100);
1861
+ color: var(--vps-dark-blue);
1842
1862
  }
1843
1863
 
1844
1864
  .agent-reasoning-header-left {
@@ -1847,28 +1867,15 @@ button {
1847
1867
  gap: 6px;
1848
1868
  }
1849
1869
 
1850
- .agent-reasoning-brain-icon {
1851
- color: var(--vps-orange);
1870
+ .agent-reasoning-spinner {
1871
+ color: var(--primary, #0284c7);
1852
1872
  flex-shrink: 0;
1873
+ animation: spinSlow 1s linear infinite;
1853
1874
  }
1854
1875
 
1855
- .agent-reasoning-brain--pulse {
1856
- color: var(--vps-orange);
1857
- animation: brainPulse 1.4s ease-in-out infinite;
1858
- }
1859
-
1860
- @keyframes brainPulse {
1861
-
1862
- 0%,
1863
- 100% {
1864
- transform: scale(1);
1865
- opacity: 1;
1866
- }
1867
-
1868
- 50% {
1869
- transform: scale(1.15);
1870
- opacity: 0.7;
1871
- }
1876
+ .agent-reasoning-done-icon {
1877
+ color: var(--green-600, #16a34a);
1878
+ flex-shrink: 0;
1872
1879
  }
1873
1880
 
1874
1881
  .agent-reasoning-title {
@@ -1878,137 +1885,6 @@ button {
1878
1885
  letter-spacing: -0.01em;
1879
1886
  }
1880
1887
 
1881
- .agent-reasoning-header-right {
1882
- display: inline-flex;
1883
- align-items: center;
1884
- gap: 4px;
1885
- color: var(--grey-600);
1886
- }
1887
-
1888
- .agent-live-badge {
1889
- font-size: 9px;
1890
- font-weight: 600;
1891
- text-transform: uppercase;
1892
- letter-spacing: 0.04em;
1893
- padding: 1px 5px;
1894
- border-radius: 3px;
1895
- background: var(--orange-100);
1896
- color: var(--vps-orange);
1897
- font-family: var(--font-main);
1898
- }
1899
-
1900
- .agent-reasoning-body {
1901
- margin-top: 5px;
1902
- margin-bottom: 8px;
1903
- padding: 10px 14px;
1904
- border-radius: 8px;
1905
- background: var(--dark-blue-50);
1906
- border: 1px solid var(--dark-blue-100);
1907
- font-family: var(--font-main);
1908
- }
1909
-
1910
- .agent-stepper {
1911
- display: flex;
1912
- flex-direction: column;
1913
- gap: 0;
1914
- }
1915
-
1916
- .agent-step-item {
1917
- display: flex;
1918
- gap: 10px;
1919
- position: relative;
1920
- font-family: var(--font-main);
1921
- }
1922
-
1923
- .agent-step-indicator {
1924
- display: flex;
1925
- flex-direction: column;
1926
- align-items: center;
1927
- width: 16px;
1928
- }
1929
-
1930
- .agent-step-circle {
1931
- width: 15px;
1932
- height: 15px;
1933
- border-radius: 50%;
1934
- font-size: 9px;
1935
- font-weight: 600;
1936
- display: flex;
1937
- align-items: center;
1938
- justify-content: center;
1939
- background: var(--dark-blue-100);
1940
- color: var(--vps-dark-blue);
1941
- flex-shrink: 0;
1942
- z-index: 1;
1943
- font-family: var(--font-main);
1944
- }
1945
-
1946
- .agent-step-check {
1947
- color: var(--success-600);
1948
- flex-shrink: 0;
1949
- z-index: 1;
1950
- }
1951
-
1952
- .agent-step-spinner {
1953
- width: 13px;
1954
- height: 13px;
1955
- border: 2px solid var(--orange-100);
1956
- border-top-color: var(--vps-orange);
1957
- border-radius: 50%;
1958
- animation: spin 0.8s linear infinite;
1959
- flex-shrink: 0;
1960
- z-index: 1;
1961
- }
1962
-
1963
- @keyframes spin {
1964
- to {
1965
- transform: rotate(360deg);
1966
- }
1967
- }
1968
-
1969
- .agent-step-line {
1970
- width: 1.5px;
1971
- flex-grow: 1;
1972
- min-height: 14px;
1973
- background: var(--dark-blue-200);
1974
- margin: 2px 0;
1975
- }
1976
-
1977
- .agent-step-content {
1978
- padding-bottom: 8px;
1979
- }
1980
-
1981
- .agent-step-label-row {
1982
- display: flex;
1983
- align-items: center;
1984
- gap: 6px;
1985
- }
1986
-
1987
- .agent-step-label {
1988
- font-size: 11.5px;
1989
- font-weight: 600;
1990
- color: var(--vps-dark-blue);
1991
- font-family: var(--font-main);
1992
- }
1993
-
1994
- .agent-step-active-tag {
1995
- font-size: 9px;
1996
- padding: 1px 4px;
1997
- border-radius: 3px;
1998
- background: var(--orange-50);
1999
- color: var(--vps-orange);
2000
- border: 1px solid var(--orange-100);
2001
- font-weight: 600;
2002
- font-family: var(--font-main);
2003
- }
2004
-
2005
- .agent-step-detail {
2006
- font-size: 10.5px;
2007
- color: var(--grey-600);
2008
- margin-top: 1px;
2009
- font-family: var(--font-main);
2010
- }
2011
-
2012
1888
  /* ── Grounded Knowledge Sources ───────────────────────────────── */
2013
1889
  .grounded-sources-card {
2014
1890
  margin-top: 10px;
@@ -2494,4 +2370,4 @@ button {
2494
2370
  color: var(--grey-600);
2495
2371
  line-height: 1.45;
2496
2372
  margin: 0;
2497
- }
2373
+ }