@agentprojectcontext/apx 1.31.2 → 1.32.2
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 +6 -1
- package/skills/apc-context/SKILL.md +5 -2
- package/skills/apx/SKILL.md +3 -3
- package/skills/apx-agency-agents/SKILL.md +5 -5
- package/skills/apx-agent/SKILL.md +7 -7
- package/skills/apx-mcp/SKILL.md +6 -4
- package/skills/apx-mcp-builder/SKILL.md +4 -7
- package/skills/apx-project/SKILL.md +4 -5
- package/skills/apx-routine/SKILL.md +14 -12
- package/skills/apx-runtime/SKILL.md +5 -3
- package/skills/apx-sessions/SKILL.md +5 -5
- package/skills/apx-skill-builder/SKILL.md +10 -6
- package/skills/apx-task/SKILL.md +8 -8
- package/skills/apx-telegram/SKILL.md +23 -7
- package/skills/apx-voice/SKILL.md +8 -6
- package/src/core/{agent-system.js → agent/build-agent-system.js} +10 -12
- package/src/core/agent/constants.js +5 -0
- package/src/core/agent/index.js +0 -2
- package/src/core/{agent-memory.js → agent/memory.js} +2 -2
- package/src/core/agent/model-router.js +21 -43
- package/src/core/agent/prompt-builder.js +17 -63
- package/src/core/agent/prompts/action-discipline.md +17 -0
- package/src/core/agent/prompts/channels/code.md +8 -12
- package/src/core/agent/prompts/channels/desktop.md +6 -4
- package/src/core/agent/prompts/channels/routine.md +10 -1
- package/src/core/agent/prompts/channels/telegram.md +5 -0
- package/src/core/agent/prompts/channels/web_code.md +20 -0
- package/src/core/agent/prompts/modes/voice.md +2 -2
- package/src/core/agent/prompts/super-agent-base.md +2 -2
- package/src/core/agent/run-agent.js +66 -36
- package/src/core/agent/runtime-bridge.js +42 -0
- package/src/core/agent/self-memory.js +19 -9
- package/src/core/agent/skills/catalog.js +65 -0
- package/src/core/agent/skills/index.js +6 -0
- package/src/{host/daemon/skills-loader.js → core/agent/skills/loader.js} +3 -3
- package/src/core/agent/skills/rag.js +91 -0
- package/src/core/agent/skills/trigger.js +71 -0
- package/src/{host/daemon → core/agent}/super-agent.js +5 -5
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/add-project.js +3 -4
- package/src/core/agent/tools/handlers/ask-questions.js +115 -0
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/call-agent.js +2 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/call-mcp.js +1 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/call-runtime.js +10 -11
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/create-task.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/discover-tools.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/edit-file.js +1 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/import-agent.js +4 -5
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-agents.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-skills.js +7 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-tasks.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-vault-agents.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/load-skill.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/read-agent-memory.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/read-self-memory.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/remember.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/run-shell.js +1 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/search-messages.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/search-sessions.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/send-telegram.js +0 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/set-identity.js +1 -3
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/set-permission-mode.js +1 -3
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/tail-messages.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/transcribe-audio.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/write-file.js +1 -2
- package/src/core/agent/tools/helpers.js +74 -0
- package/src/{host/daemon/super-agent-tools → core/agent/tools}/registry-bridge.js +3 -3
- package/src/{host/daemon/super-agent-tools/index.js → core/agent/tools/registry.js} +31 -32
- package/src/core/apc/agents-vault.js +37 -0
- package/src/core/{scaffold.js → apc/scaffold.js} +4 -5
- package/src/core/{config.js → config/index.js} +21 -27
- package/src/core/config/paths.js +32 -0
- package/src/core/constants/actors.js +8 -0
- package/src/core/constants/channels.js +19 -0
- package/src/core/constants/index.js +5 -0
- package/src/core/constants/permissions.js +17 -0
- package/src/core/constants/roles.js +9 -0
- package/src/core/engines/_streaming.js +63 -0
- package/src/core/engines/anthropic.js +11 -22
- package/src/core/engines/ollama.js +7 -16
- package/src/core/identity/index.js +8 -0
- package/src/core/{identity.js → identity/self.js} +5 -5
- package/src/core/{telegram-identity.js → identity/telegram.js} +1 -1
- package/src/core/logging.js +1 -1
- package/src/core/mascot.js +1 -1
- package/src/core/memory/active-threads.js +10 -10
- package/src/core/memory/broker.js +9 -9
- package/src/core/memory/compactor.js +2 -2
- package/src/core/memory/index.js +2 -2
- package/src/core/memory/indexer.js +1 -1
- package/src/core/{code-sessions-store.js → stores/code-sessions.js} +3 -7
- package/src/core/{messages-store.js → stores/messages.js} +6 -4
- package/src/core/stores/routine-memory.js +71 -0
- package/src/core/{routines-store.js → stores/routines.js} +1 -3
- package/src/core/stores/runtime-sessions.js +99 -0
- package/src/core/{tasks-store.js → stores/tasks.js} +3 -8
- package/src/core/update-check.js +1 -1
- package/src/core/util/ids.js +14 -0
- package/src/core/util/index.js +2 -0
- package/src/core/util/text-similarity.js +52 -0
- package/src/core/util/time.js +9 -0
- package/src/core/voice/tts.js +1 -1
- package/src/host/daemon/api/admin-config.js +4 -3
- package/src/host/daemon/api/admin.js +1 -1
- package/src/host/daemon/api/agents.js +4 -25
- package/src/host/daemon/api/artifacts.js +118 -1
- package/src/host/daemon/api/code.js +60 -16
- package/src/host/daemon/api/confirm.js +1 -1
- package/src/host/daemon/api/connections.js +2 -2
- package/src/host/daemon/api/conversations.js +2 -2
- package/src/host/daemon/api/deck.js +1 -1
- package/src/host/daemon/api/desktop.js +1 -1
- package/src/host/daemon/api/embeddings.js +4 -4
- package/src/host/daemon/api/engines.js +2 -2
- package/src/host/daemon/api/exec.js +3 -3
- package/src/host/daemon/api/identity.js +1 -1
- package/src/host/daemon/api/mcps.js +1 -1
- package/src/host/daemon/api/messages.js +1 -1
- package/src/host/daemon/api/runtimes.js +9 -8
- package/src/host/daemon/api/sessions-search.js +1 -1
- package/src/host/daemon/api/sessions.js +2 -2
- package/src/host/daemon/api/shared.js +5 -4
- package/src/host/daemon/api/skills.js +30 -0
- package/src/host/daemon/api/super-agent.js +29 -9
- package/src/host/daemon/api/tasks.js +2 -2
- package/src/host/daemon/api/telegram.js +1 -1
- package/src/host/daemon/api/tools.js +6 -6
- package/src/host/daemon/api/tts.js +2 -2
- package/src/host/daemon/api/voice.js +14 -12
- package/src/host/daemon/api.js +2 -0
- package/src/host/daemon/compact.js +1 -1
- package/src/host/daemon/db.js +4 -4
- package/src/host/daemon/desktop-ws.js +1 -1
- package/src/host/daemon/index.js +4 -4
- package/src/host/daemon/plugins/{desktop.js → desktop/index.js} +45 -6
- package/src/host/daemon/plugins/index.js +2 -2
- package/src/host/daemon/plugins/telegram/ask.js +309 -0
- package/src/host/daemon/plugins/{telegram.js → telegram/index.js} +390 -191
- package/src/host/daemon/plugins/telegram/media.js +162 -0
- package/src/host/daemon/projects-helpers.js +54 -0
- package/src/host/daemon/routines.js +28 -12
- package/src/host/daemon/smoke.js +2 -2
- package/src/host/daemon/token-store.js +1 -1
- package/src/host/daemon/transcription.js +2 -2
- package/src/host/daemon/wakeup.js +2 -2
- package/src/interfaces/cli/commands/agent.js +3 -3
- package/src/interfaces/cli/commands/artifact.js +99 -0
- package/src/interfaces/cli/commands/command.js +1 -1
- package/src/interfaces/cli/commands/config.js +3 -2
- package/src/interfaces/cli/commands/desktop.js +1 -1
- package/src/interfaces/cli/commands/exec.js +2 -1
- package/src/interfaces/cli/commands/identity.js +2 -2
- package/src/interfaces/cli/commands/init.js +1 -1
- package/src/interfaces/cli/commands/mcp.js +1 -1
- package/src/interfaces/cli/commands/memory.js +2 -2
- package/src/interfaces/cli/commands/model.js +16 -6
- package/src/interfaces/cli/commands/project.js +1 -1
- package/src/interfaces/cli/commands/routine.js +58 -0
- package/src/interfaces/cli/commands/search.js +1 -1
- package/src/interfaces/cli/commands/session.js +4 -4
- package/src/interfaces/cli/commands/setup.js +4 -3
- package/src/interfaces/cli/commands/skills.js +25 -4
- package/src/interfaces/cli/commands/status.js +1 -1
- package/src/interfaces/cli/commands/sys.js +11 -4
- package/src/interfaces/cli/commands/update.js +1 -1
- package/src/interfaces/cli/index.js +8 -4
- package/src/interfaces/cli/postinstall.js +2 -2
- package/src/interfaces/cli/terminal-chat/renderer.js +22 -2
- package/src/interfaces/mcp-server/index.js +1 -1
- package/src/interfaces/tui/component/prompt/index.tsx +3 -1
- package/src/interfaces/tui/context/sdk-apx.tsx +47 -7
- package/src/interfaces/tui/context/sync-apx.tsx +20 -2
- package/src/interfaces/tui/context/sync.tsx +2 -1
- package/src/interfaces/tui/routes/session/index.tsx +151 -136
- package/src/interfaces/tui/routes/session/sidebar-apx.tsx +37 -15
- package/src/interfaces/tui/run.ts +2 -0
- package/src/interfaces/web/dist/assets/index-34U_Mp1M.css +1 -0
- package/src/interfaces/web/dist/assets/index-BkybwwRn.js +570 -0
- package/src/interfaces/web/dist/assets/index-BkybwwRn.js.map +1 -0
- package/src/interfaces/web/dist/index.html +2 -2
- package/src/interfaces/web/package-lock.json +9 -9
- package/src/interfaces/web/src/App.tsx +51 -32
- package/src/interfaces/web/src/components/RobyBubble.tsx +12 -6
- package/src/interfaces/web/src/components/UiSelect.tsx +1 -1
- package/src/interfaces/web/src/components/chat/AskQuestionsCard.tsx +72 -0
- package/src/interfaces/web/src/components/chat/InlineAskPanel.tsx +399 -0
- package/src/interfaces/web/src/components/chat/MessageBubble.tsx +16 -3
- package/src/interfaces/web/src/components/chat/MessageList.tsx +2 -1
- package/src/interfaces/web/src/components/chat/SkillPicker.tsx +77 -0
- package/src/interfaces/web/src/components/code/CodeArtifactsTab.tsx +230 -0
- package/src/interfaces/web/src/components/code/CodeProjectPicker.tsx +1 -1
- package/src/interfaces/web/src/components/code/CodeSidePanel.tsx +40 -17
- package/src/interfaces/web/src/components/common/TabLayout.tsx +9 -5
- package/src/interfaces/web/src/components/common/TabNav.tsx +3 -3
- package/src/interfaces/web/src/components/layout/ProjectSidebar.tsx +4 -2
- package/src/interfaces/web/src/hooks/useChat.ts +47 -2
- package/src/interfaces/web/src/hooks/useNavCollapseCtx.tsx +59 -0
- package/src/interfaces/web/src/hooks/usePersonaName.ts +11 -0
- package/src/interfaces/web/src/i18n/en.ts +27 -7
- package/src/interfaces/web/src/i18n/es.ts +27 -7
- package/src/interfaces/web/src/lib/api/artifacts.ts +47 -0
- package/src/interfaces/web/src/lib/api/skills.ts +25 -0
- package/src/interfaces/web/src/lib/api.ts +2 -0
- package/src/interfaces/web/src/screens/modules/CodeScreen.tsx +41 -20
- package/src/interfaces/web/src/screens/modules/DeckScreen.tsx +5 -18
- package/src/interfaces/web/src/screens/modules/DesktopScreen.tsx +1 -8
- package/src/interfaces/web/src/screens/modules/VoiceScreen.tsx +39 -40
- package/src/interfaces/web/src/screens/project/ChatTab.tsx +27 -9
- package/src/skills/apc-context/SKILL.md +159 -0
- package/src/core/agent/ghost-guard.js +0 -24
- package/src/core/agent/prompts/channels/terminal.md +0 -16
- package/src/host/daemon/apc-runtime-context.js +0 -124
- package/src/host/daemon/super-agent-tools/helpers.js +0 -124
- package/src/host/daemon/super-agent-tools/tools/ask-questions.js +0 -32
- package/src/host/daemon/tool-call-parser.js +0 -2
- package/src/interfaces/web/dist/assets/index-BDUsA6L6.css +0 -1
- package/src/interfaces/web/dist/assets/index-BV615I9p.js +0 -548
- package/src/interfaces/web/dist/assets/index-BV615I9p.js.map +0 -1
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-files.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-mcps.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-projects.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/read-file.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/search-files.js +0 -0
- /package/src/core/agent/{pseudo-tools.js → tools/pseudo-tools.js} +0 -0
- /package/src/core/agent/{tool-call-parser.js → tools/tool-call-parser.js} +0 -0
- /package/src/core/{parser.js → apc/parser.js} +0 -0
- /package/src/core/{apc-skill-sync.js → apc/skill-sync.js} +0 -0
- /package/src/core/{artifacts-store.js → stores/artifacts.js} +0 -0
- /package/src/{host/daemon → core/stores}/engine-sessions.js +0 -0
- /package/src/core/{session-store.js → stores/sessions.js} +0 -0
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<link rel="apple-touch-icon" href="/favicon/dark/apple-touch-icon.png" media="(prefers-color-scheme: dark)" />
|
|
19
19
|
<link rel="manifest" href="/favicon/white/site.webmanifest" media="(prefers-color-scheme: light)" />
|
|
20
20
|
<link rel="manifest" href="/favicon/dark/site.webmanifest" media="(prefers-color-scheme: dark)" />
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
22
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
21
|
+
<script type="module" crossorigin src="/assets/index-BkybwwRn.js"></script>
|
|
22
|
+
<link rel="stylesheet" crossorigin href="/assets/index-34U_Mp1M.css">
|
|
23
23
|
</head>
|
|
24
24
|
<body class="bg-background text-foreground antialiased">
|
|
25
25
|
<div id="root"></div>
|
|
@@ -2077,9 +2077,9 @@
|
|
|
2077
2077
|
"license": "MIT"
|
|
2078
2078
|
},
|
|
2079
2079
|
"node_modules/@types/node": {
|
|
2080
|
-
"version": "25.9.
|
|
2081
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.
|
|
2082
|
-
"integrity": "sha512-
|
|
2080
|
+
"version": "25.9.3",
|
|
2081
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.3.tgz",
|
|
2082
|
+
"integrity": "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg==",
|
|
2083
2083
|
"devOptional": true,
|
|
2084
2084
|
"license": "MIT",
|
|
2085
2085
|
"dependencies": {
|
|
@@ -2180,9 +2180,9 @@
|
|
|
2180
2180
|
}
|
|
2181
2181
|
},
|
|
2182
2182
|
"node_modules/baseline-browser-mapping": {
|
|
2183
|
-
"version": "2.10.
|
|
2184
|
-
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.
|
|
2185
|
-
"integrity": "sha512-
|
|
2183
|
+
"version": "2.10.35",
|
|
2184
|
+
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.35.tgz",
|
|
2185
|
+
"integrity": "sha512-honAfLBde0HAFLdNyBEfuuENkF6zR+ozxqxa/2zJKHBe1qzLqyTSeRKpdPEHAP03rlDGyQOPnCSxnVpVqQo9Mg==",
|
|
2186
2186
|
"dev": true,
|
|
2187
2187
|
"license": "Apache-2.0",
|
|
2188
2188
|
"bin": {
|
|
@@ -2598,9 +2598,9 @@
|
|
|
2598
2598
|
"license": "MIT"
|
|
2599
2599
|
},
|
|
2600
2600
|
"node_modules/electron-to-chromium": {
|
|
2601
|
-
"version": "1.5.
|
|
2602
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
2603
|
-
"integrity": "sha512-
|
|
2601
|
+
"version": "1.5.371",
|
|
2602
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.371.tgz",
|
|
2603
|
+
"integrity": "sha512-e9htk9mAYL6AzmkEhSvVVw7IWGSBJ/Bqdn2eRyRLrj1g6sncN4WbFt5qnILYoCktktr45pyjIrOiRvBThQ808w==",
|
|
2604
2604
|
"dev": true,
|
|
2605
2605
|
"license": "ISC"
|
|
2606
2606
|
},
|
|
@@ -17,6 +17,8 @@ import { TooltipProvider } from "./components/ui/tooltip";
|
|
|
17
17
|
import { useTheme } from "./hooks/useTheme";
|
|
18
18
|
import { useProjects } from "./hooks/useProjects";
|
|
19
19
|
import { useTokenBootstrap } from "./hooks/useTokenBootstrap";
|
|
20
|
+
import { NavCollapseProvider, useNavCollapseCtx, usePageLabel } from "./hooks/useNavCollapseCtx";
|
|
21
|
+
import { NavToggle } from "./components/common/TabNav";
|
|
20
22
|
import { t } from "./i18n";
|
|
21
23
|
|
|
22
24
|
export function App() {
|
|
@@ -61,28 +63,30 @@ function Shell() {
|
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
return (
|
|
64
|
-
<
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
66
|
+
<NavCollapseProvider>
|
|
67
|
+
<div className="flex h-screen w-screen overflow-hidden bg-background text-foreground" data-testid="app-shell">
|
|
68
|
+
<ProjectSidebar onSelect={(href) => navigate(href)} onOpenRoby={() => setRobyOpen(true)} />
|
|
69
|
+
<main className="m-2 ml-0 flex min-w-0 flex-1 flex-col overflow-hidden rounded-xl border border-border bg-card shadow-sm">
|
|
70
|
+
<TopBar onToggleTheme={toggle} isDark={theme === "dark"} pathname={location.pathname} />
|
|
71
|
+
<div className="flex-1 overflow-y-auto">
|
|
72
|
+
<Routes>
|
|
73
|
+
<Route path="/" element={<ApxAdminScreen />} />
|
|
74
|
+
<Route path="/settings/*" element={<SettingsScreen />} />
|
|
75
|
+
<Route path="/m/voice/*" element={<VoiceScreen />} />
|
|
76
|
+
<Route path="/m/desktop/*" element={<DesktopScreen />} />
|
|
77
|
+
<Route path="/m/deck/*" element={<DeckScreen />} />
|
|
78
|
+
<Route path="/m/code/*" element={<CodeScreen />} />
|
|
79
|
+
<Route path="/p/:pid/*" element={<ProjectScreen />} />
|
|
80
|
+
<Route path="*" element={<NotFound />} />
|
|
81
|
+
</Routes>
|
|
82
|
+
</div>
|
|
83
|
+
</main>
|
|
84
|
+
<AddProjectDialog open={addOpen} onClose={closeAdd} />
|
|
85
|
+
{/* Roby (the super-agent) chat sheet. Launcher lives in the rail (below
|
|
86
|
+
Settings); open state is owned here so the rail can trigger it. */}
|
|
87
|
+
<RobyBubble open={robyOpen} onOpenChange={setRobyOpen} />
|
|
88
|
+
</div>
|
|
89
|
+
</NavCollapseProvider>
|
|
86
90
|
);
|
|
87
91
|
}
|
|
88
92
|
|
|
@@ -96,6 +100,7 @@ function TopBar({
|
|
|
96
100
|
pathname: string;
|
|
97
101
|
}) {
|
|
98
102
|
const { projects } = useProjects();
|
|
103
|
+
const pageLabel = usePageLabel();
|
|
99
104
|
const parts = pathname.split("/").filter(Boolean);
|
|
100
105
|
const project = parts[0] === "p" ? projects.find((p) => String(p.id) === parts[1]) : undefined;
|
|
101
106
|
const section = parts[0] === "settings"
|
|
@@ -109,11 +114,13 @@ function TopBar({
|
|
|
109
114
|
? t("topbar.breadcrumb_root")
|
|
110
115
|
: parts[0] === "settings"
|
|
111
116
|
? [t("topbar.breadcrumb_root"), t("nav.settings"), section].filter(Boolean).join(" › ")
|
|
112
|
-
: parts[0] === "
|
|
113
|
-
? (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
: parts[0] === "m"
|
|
118
|
+
? [t("topbar.breadcrumb_root"), moduleLabel(parts[1]), pageLabel].filter(Boolean).join(" › ")
|
|
119
|
+
: parts[0] === "p"
|
|
120
|
+
? (isDefault
|
|
121
|
+
? [t("topbar.breadcrumb_root"), t("topbar.breadcrumb_base"), section].filter(Boolean).join(" › ")
|
|
122
|
+
: [t("topbar.breadcrumb_root"), t("topbar.breadcrumb_projects"), projName, section].filter(Boolean).join(" › "))
|
|
123
|
+
: t("topbar.breadcrumb_root");
|
|
117
124
|
const subtitle = pathname === "/"
|
|
118
125
|
? ""
|
|
119
126
|
: parts[0] === "settings"
|
|
@@ -123,24 +130,36 @@ function TopBar({
|
|
|
123
130
|
? t("base.subtitle")
|
|
124
131
|
: project ? `${projectKindLabel(project.kind)} · ${project.path}` : "")
|
|
125
132
|
: "";
|
|
133
|
+
const nav = useNavCollapseCtx();
|
|
126
134
|
return (
|
|
127
|
-
<header className="flex h-
|
|
128
|
-
<
|
|
135
|
+
<header className="flex h-10 shrink-0 items-center gap-2 border-b border-border/50 px-3">
|
|
136
|
+
{nav && <NavToggle collapsed={nav.collapsed} onToggle={nav.toggle} />}
|
|
137
|
+
<span className="min-w-0 flex-1 truncate text-[11px] tracking-wide text-muted-fg">
|
|
129
138
|
{crumb}
|
|
130
|
-
{subtitle && <span className="text-muted-fg/
|
|
139
|
+
{subtitle && <span className="text-muted-fg/50"> · {subtitle}</span>}
|
|
131
140
|
</span>
|
|
132
141
|
<button
|
|
133
142
|
type="button"
|
|
134
143
|
onClick={onToggleTheme}
|
|
135
144
|
title={isDark ? t("topbar.light") : t("topbar.dark")}
|
|
136
|
-
className="rounded-md p-1.5 text-muted-fg hover:bg-accent hover:text-accent-fg"
|
|
145
|
+
className="shrink-0 rounded-md p-1.5 text-muted-fg hover:bg-accent hover:text-accent-fg"
|
|
137
146
|
>
|
|
138
|
-
{isDark ? <Sun size={
|
|
147
|
+
{isDark ? <Sun size={14} /> : <Moon size={14} />}
|
|
139
148
|
</button>
|
|
140
149
|
</header>
|
|
141
150
|
);
|
|
142
151
|
}
|
|
143
152
|
|
|
153
|
+
function moduleLabel(key?: string) {
|
|
154
|
+
switch (key) {
|
|
155
|
+
case "voice": return t("nav.modules.voice");
|
|
156
|
+
case "desktop": return t("nav.modules.desktop");
|
|
157
|
+
case "deck": return t("nav.modules.deck");
|
|
158
|
+
case "code": return t("nav.modules.code");
|
|
159
|
+
default: return key || "";
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
144
163
|
function settingsLabel(key?: string) {
|
|
145
164
|
switch (key) {
|
|
146
165
|
case "super-agent": return t("settings.tabs.super_agent");
|
|
@@ -15,6 +15,7 @@ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "
|
|
|
15
15
|
import { Button } from "./ui/button";
|
|
16
16
|
import { ChatInput } from "./ui/chat-input";
|
|
17
17
|
import { ModelPicker } from "./chat/ModelPicker";
|
|
18
|
+
import { SkillPicker } from "./chat/SkillPicker";
|
|
18
19
|
import { MessageList } from "./chat/MessageList";
|
|
19
20
|
import { ContextBar } from "./chat/ContextBar";
|
|
20
21
|
import { applyStreamEvent, textOf, type ChatMsg } from "../hooks/useChat";
|
|
@@ -22,6 +23,7 @@ import { SuperAgent } from "../lib/api";
|
|
|
22
23
|
import { STORAGE } from "../constants";
|
|
23
24
|
import { useToast } from "./Toast";
|
|
24
25
|
import { t } from "../i18n";
|
|
26
|
+
import { usePersonaName } from "../hooks/usePersonaName";
|
|
25
27
|
import type { ChatStreamEvent, ConversationMessage } from "../types/daemon";
|
|
26
28
|
|
|
27
29
|
// Load any persisted conversation, dropping half-finished (pending) turns.
|
|
@@ -44,6 +46,7 @@ export function RobyBubble({
|
|
|
44
46
|
open: boolean;
|
|
45
47
|
onOpenChange: (open: boolean) => void;
|
|
46
48
|
}) {
|
|
49
|
+
const persona = usePersonaName();
|
|
47
50
|
const toast = useToast();
|
|
48
51
|
const [msgs, setMsgs] = useState<ChatMsg[]>(loadStored);
|
|
49
52
|
const [draft, setDraft] = useState("");
|
|
@@ -170,15 +173,15 @@ export function RobyBubble({
|
|
|
170
173
|
>
|
|
171
174
|
<SheetHeader className="pr-12">
|
|
172
175
|
<SheetTitle className="flex items-center gap-2">
|
|
173
|
-
<Bot size={18} /> {t("
|
|
174
|
-
<span className="text-xs font-normal text-muted-fg">{t("
|
|
176
|
+
<Bot size={18} /> {t("superagent.title", { persona })}
|
|
177
|
+
<span className="text-xs font-normal text-muted-fg">{t("superagent.badge")}</span>
|
|
175
178
|
</SheetTitle>
|
|
176
|
-
<SheetDescription>{t("
|
|
179
|
+
<SheetDescription>{t("superagent.desc")}</SheetDescription>
|
|
177
180
|
</SheetHeader>
|
|
178
181
|
|
|
179
182
|
<div className="flex-1 overflow-y-auto">
|
|
180
183
|
{msgs.length === 0 ? (
|
|
181
|
-
<p className="mt-6 text-center text-sm text-muted-fg">{t("
|
|
184
|
+
<p className="mt-6 text-center text-sm text-muted-fg">{t("superagent.empty", { persona })}</p>
|
|
182
185
|
) : (
|
|
183
186
|
<MessageList msgs={msgs} onCopy={copyToClipboard} />
|
|
184
187
|
)}
|
|
@@ -187,13 +190,16 @@ export function RobyBubble({
|
|
|
187
190
|
<ContextBar msgs={msgs} />
|
|
188
191
|
|
|
189
192
|
<div className="border-t border-border p-3">
|
|
193
|
+
<div className="mb-1.5">
|
|
194
|
+
<SkillPicker value={draft} onPick={(slug) => setDraft(`/${slug} `)} />
|
|
195
|
+
</div>
|
|
190
196
|
<ChatInput
|
|
191
197
|
value={draft}
|
|
192
198
|
onValueChange={setDraft}
|
|
193
199
|
onSubmit={() => void send()}
|
|
194
200
|
onStop={stop}
|
|
195
201
|
busy={busy}
|
|
196
|
-
placeholder={t("
|
|
202
|
+
placeholder={t("superagent.placeholder")}
|
|
197
203
|
footer={<ModelPicker value={model} onChange={setModel} disabled={busy} />}
|
|
198
204
|
/>
|
|
199
205
|
<div className="mt-1.5 flex justify-end">
|
|
@@ -203,7 +209,7 @@ export function RobyBubble({
|
|
|
203
209
|
onClick={newChat}
|
|
204
210
|
disabled={busy || msgs.length === 0}
|
|
205
211
|
>
|
|
206
|
-
<Plus className="size-3" /> {t("
|
|
212
|
+
<Plus className="size-3" /> {t("superagent.new_chat")}
|
|
207
213
|
</Button>
|
|
208
214
|
</div>
|
|
209
215
|
</div>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Loader2, CheckCircle2, MessageCircleQuestion } from "lucide-react";
|
|
2
|
+
import { cn } from "../../lib/cn";
|
|
3
|
+
import { t } from "../../i18n";
|
|
4
|
+
import type { ToolPart } from "../../hooks/useChat";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
part: ToolPart;
|
|
8
|
+
/** True while the user has not yet answered (panel still showing). */
|
|
9
|
+
pending: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Extract the question texts (whatever shape — strings or {question}) so we can
|
|
13
|
+
// preview them inside the card without depending on the panel's normalizer.
|
|
14
|
+
function questionTexts(part: ToolPart): string[] {
|
|
15
|
+
const args = part.args as Record<string, unknown> | undefined;
|
|
16
|
+
const arr = args && Array.isArray(args.questions) ? (args.questions as unknown[]) : [];
|
|
17
|
+
return arr
|
|
18
|
+
.map((q) => {
|
|
19
|
+
if (typeof q === "string") return q;
|
|
20
|
+
if (q && typeof q === "object" && typeof (q as Record<string, unknown>).question === "string") {
|
|
21
|
+
return (q as Record<string, unknown>).question as string;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
})
|
|
25
|
+
.filter((s): s is string => !!s);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Special rendering for the ask_questions tool call. Instead of the generic
|
|
29
|
+
// collapsed tool widget, show a status bubble:
|
|
30
|
+
// • pending → spinner + "Esperando respuesta…" + the question list
|
|
31
|
+
// • answered → green check + "Respuestas recibidas" + the same list (muted)
|
|
32
|
+
// The actual answer lives in the NEXT user message; we don't duplicate it here.
|
|
33
|
+
export function AskQuestionsCard({ part, pending }: Props) {
|
|
34
|
+
const questions = questionTexts(part);
|
|
35
|
+
const label = pending
|
|
36
|
+
? t("ask_panel.status_waiting")
|
|
37
|
+
: t("ask_panel.status_received");
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
className={cn(
|
|
41
|
+
"rounded-2xl border px-3 py-2 text-sm shadow-sm",
|
|
42
|
+
pending
|
|
43
|
+
? "rounded-bl-sm border-amber-500/30 bg-amber-500/5 text-foreground"
|
|
44
|
+
: "rounded-bl-sm border-emerald-500/30 bg-emerald-500/5 text-foreground",
|
|
45
|
+
)}
|
|
46
|
+
data-testid="ask-questions-card"
|
|
47
|
+
data-state={pending ? "pending" : "answered"}
|
|
48
|
+
>
|
|
49
|
+
<div className="flex items-center gap-2">
|
|
50
|
+
{pending ? (
|
|
51
|
+
<Loader2 className="size-3.5 shrink-0 animate-spin text-amber-600 dark:text-amber-400" />
|
|
52
|
+
) : (
|
|
53
|
+
<CheckCircle2 className="size-3.5 shrink-0 text-emerald-600 dark:text-emerald-400" />
|
|
54
|
+
)}
|
|
55
|
+
<MessageCircleQuestion className="size-3.5 shrink-0 text-muted-foreground" />
|
|
56
|
+
<span className="text-[12px] font-medium">{label}</span>
|
|
57
|
+
{questions.length > 1 && (
|
|
58
|
+
<span className="ml-auto text-[10px] text-muted-foreground">
|
|
59
|
+
{questions.length} preguntas
|
|
60
|
+
</span>
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
{questions.length > 0 && (
|
|
64
|
+
<ul className="mt-1.5 space-y-0.5 pl-5 text-[12px] text-muted-foreground">
|
|
65
|
+
{questions.map((q, i) => (
|
|
66
|
+
<li key={i} className="list-disc">{q}</li>
|
|
67
|
+
))}
|
|
68
|
+
</ul>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|