@steerable/agent-shell-web 0.14.4 → 0.14.5
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.
- package/package.json +4 -4
- package/src/components/AgentSidebar.tsx +189 -46
- package/src/components/ChatHeader.tsx +12 -1
- package/src/components/SidebarAccount.tsx +33 -41
- package/src/components/chat/AssistantMessage.tsx +25 -4
- package/src/components/chat/ChatInput.tsx +169 -111
- package/src/components/chat/ChatProjectBadge.tsx +233 -88
- package/src/components/chat/ContextUsagePill.tsx +20 -5
- package/src/components/chat/ExecPolicyPicker.tsx +72 -67
- package/src/components/chat/LocalChatPanel.tsx +8 -33
- package/src/components/chat/MessageList.tsx +109 -19
- package/src/components/chat/ModelPicker.tsx +2 -2
- package/src/components/chat/SessionTodoList.tsx +63 -72
- package/src/components/chat/TurnFilesCard.tsx +270 -112
- package/src/components/chat/TurnProcessGroup.tsx +3 -0
- package/src/components/chat/TurnProcessTimeline.tsx +13 -0
- package/src/components/chat/UserMessage.tsx +8 -1
- package/src/components/chat/next-steps-tags.ts +13 -0
- package/src/components/chat/process-status.ts +112 -2
- package/src/components/chat/todo-list-model.ts +52 -4
- package/src/layouts/AgentLayout.tsx +173 -10
- package/src/layouts/PanelToggleButton.tsx +27 -9
- package/src/layouts/conversation-preview.ts +3 -0
- package/src/layouts/request-chat-slot.ts +20 -0
- package/src/layouts/right-panel-tabs.ts +32 -0
- package/src/lib/file-preview-registry.ts +57 -0
- package/src/pages/AgentPage.tsx +6 -3
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product-neutral registry for in-app deliverable preview handlers.
|
|
3
|
+
*
|
|
4
|
+
* Host packs register file matchers and side-panel openers here so
|
|
5
|
+
* `DeliverableCard` can render a first-class `Preview` button without
|
|
6
|
+
* coupling `@steerable/agent-shell-web` to specific document packs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface DeliverablePreviewOpenInput {
|
|
10
|
+
chatId: string | null;
|
|
11
|
+
messageId?: string;
|
|
12
|
+
filePath: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DeliverablePreviewHandler {
|
|
16
|
+
id: string;
|
|
17
|
+
canPreview: (filePath: string) => boolean;
|
|
18
|
+
openPreview: (input: DeliverablePreviewOpenInput) => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const handlers = new Map<string, DeliverablePreviewHandler>();
|
|
22
|
+
const listeners = new Set<() => void>();
|
|
23
|
+
|
|
24
|
+
function notify(): void {
|
|
25
|
+
for (const listener of listeners) listener();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function registerDeliverablePreviewer(handler: DeliverablePreviewHandler): () => void {
|
|
29
|
+
handlers.set(handler.id, handler);
|
|
30
|
+
notify();
|
|
31
|
+
return () => {
|
|
32
|
+
if (handlers.get(handler.id) === handler) {
|
|
33
|
+
handlers.delete(handler.id);
|
|
34
|
+
notify();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function findDeliverablePreviewer(filePath: string): DeliverablePreviewHandler | null {
|
|
40
|
+
if (!filePath) return null;
|
|
41
|
+
for (const handler of handlers.values()) {
|
|
42
|
+
if (handler.canPreview(filePath)) return handler;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function subscribeDeliverablePreviewers(listener: () => void): () => void {
|
|
48
|
+
listeners.add(listener);
|
|
49
|
+
return () => {
|
|
50
|
+
listeners.delete(listener);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function clearDeliverablePreviewersForTests(): void {
|
|
55
|
+
handlers.clear();
|
|
56
|
+
notify();
|
|
57
|
+
}
|
package/src/pages/AgentPage.tsx
CHANGED
|
@@ -1759,6 +1759,8 @@ function AgentChatView({
|
|
|
1759
1759
|
chatSlots={ctx.chatSlots}
|
|
1760
1760
|
rightPanel={ctx.rightPanel}
|
|
1761
1761
|
openPanelIds={ctx.openPanelIds}
|
|
1762
|
+
hiddenPanelCount={ctx.hiddenPanelCount}
|
|
1763
|
+
hiddenPanelTitle={ctx.hiddenPanelTitle}
|
|
1762
1764
|
onOpenRightPanel={ctx.onOpenRightPanel}
|
|
1763
1765
|
showProject={showProjectsChrome}
|
|
1764
1766
|
project={chatProject}
|
|
@@ -1778,7 +1780,7 @@ function AgentChatView({
|
|
|
1778
1780
|
: undefined
|
|
1779
1781
|
}
|
|
1780
1782
|
onEditUserMessage={hasHostBridge() ? handleEditUserMessage : undefined}
|
|
1781
|
-
inputPlaceholder={t("Message the
|
|
1783
|
+
inputPlaceholder={t("Message the Agent, type / for skills and commands…")}
|
|
1782
1784
|
agents={ctx.agents}
|
|
1783
1785
|
chats={ctx.chats}
|
|
1784
1786
|
currentAgent={agent}
|
|
@@ -2107,8 +2109,9 @@ function EmptyChatGate() {
|
|
|
2107
2109
|
placeholder={
|
|
2108
2110
|
mode === "plan"
|
|
2109
2111
|
? t("Describe your goal. The Agent will make a plan first…")
|
|
2110
|
-
: t("
|
|
2112
|
+
: t("Ask anything, type / for skills and commands…")
|
|
2111
2113
|
}
|
|
2114
|
+
layoutVariant="hero"
|
|
2112
2115
|
currentAgent={selectedAgent}
|
|
2113
2116
|
agents={ctx.agents}
|
|
2114
2117
|
chats={ctx.chats}
|
|
@@ -2119,7 +2122,7 @@ function EmptyChatGate() {
|
|
|
2119
2122
|
? () => setLlmSettingsOpen(true)
|
|
2120
2123
|
: undefined
|
|
2121
2124
|
}
|
|
2122
|
-
|
|
2125
|
+
toolbarTrailing={
|
|
2123
2126
|
<ModelPicker
|
|
2124
2127
|
model={modelOverride}
|
|
2125
2128
|
reasoningEffort={effortOverride}
|