@agent-native/core 0.91.2 → 0.92.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.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +17 -0
- package/corpus/core/docs/content/faq.mdx +17 -0
- package/corpus/core/docs/content/notifications.mdx +12 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +140 -46
- package/corpus/core/src/agent/tool-search.ts +71 -4
- package/corpus/core/src/cli/index.ts +20 -0
- package/corpus/core/src/cli/upgrade.ts +798 -0
- package/corpus/core/src/client/AssistantChat.tsx +1 -1
- package/corpus/core/src/client/HighlightedCodeBlock.tsx +20 -3
- package/corpus/core/src/client/agent-chat-adapter.ts +31 -6
- package/corpus/core/src/client/chat/message-components.tsx +85 -8
- package/corpus/core/src/client/chat/tool-call-display.tsx +355 -144
- package/corpus/core/src/client/code-agent-chat-adapter.ts +2 -9
- package/corpus/core/src/client/session-replay.ts +3 -97
- package/corpus/core/src/client/settings/SettingsPanel.tsx +533 -389
- package/corpus/core/src/client/settings/SettingsSection.tsx +154 -17
- package/corpus/core/src/client/sse-event-processor.ts +29 -2
- package/corpus/core/src/extensions/actions.ts +113 -5
- package/corpus/core/src/notifications/channels.ts +88 -25
- package/corpus/core/src/notifications/registry.ts +17 -3
- package/corpus/core/src/notifications/types.ts +4 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +7 -3
- package/corpus/core/src/server/request-context.ts +7 -0
- package/corpus/core/src/styles/agent-conversation.css +1 -1
- package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/default/AGENTS.md +10 -3
- package/corpus/core/src/templates/default/package.json +2 -1
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/headless/AGENTS.md +9 -3
- package/corpus/core/src/templates/headless/package.json +1 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/workspace-root/AGENTS.md +10 -4
- package/corpus/core/src/templates/workspace-root/package.json +1 -0
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +5 -6
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/analytics/AGENTS.md +7 -5
- package/corpus/templates/analytics/actions/save-monitor.ts +14 -0
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +41 -6
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +122 -11
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +8 -2
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +151 -32
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +17 -2
- package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +4 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +54 -190
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-tables-keep-their-size-while-loading.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-monitoring-uptime-and-errors-tabs-now-clearly-show-which-view-is-active.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-uses-stock-rrweb-sizing-again-so-recorded.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-dashboard-menus-now-open-above-the-dashboard-canvas.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-alerting-clarifies-in-app-inbox-vs-email-and-lets-you-paste-slack-or-webhook-urls-per-monitor.md +6 -0
- package/corpus/templates/analytics/docs/uptime-monitoring.md +13 -11
- package/corpus/templates/analytics/server/db/schema-monitoring.ts +4 -0
- package/corpus/templates/analytics/server/lib/uptime-monitors.ts +60 -12
- package/corpus/templates/analytics/server/plugins/db.ts +10 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-notes-stay-active-from-tray-and-shortcut-controls.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-popovers-can-start-notes-and-join-the-meetin.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-notes-keep-their-recording-state-when-the-desktop.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-reminder-dropdowns-now-expand-fully-instead-of-being.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +123 -3
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +15 -1
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +23 -0
- package/corpus/templates/clips/desktop/src/styles.css +23 -1
- package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +1 -3
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +40 -6
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +4 -2
- package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +3 -5
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +23 -19
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +3 -3
- package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +0 -1
- package/corpus/templates/clips/desktop/src-tauri/src/state.rs +5 -0
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -6
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/content/actions/_batch-utils.ts +8 -0
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +7 -5
- package/corpus/templates/content/actions/_database-source-utils.ts +776 -319
- package/corpus/templates/content/actions/_database-utils.ts +6 -1
- package/corpus/templates/content/actions/_property-utils.ts +168 -0
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +19 -12
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +19 -12
- package/corpus/templates/content/actions/delete-document.ts +9 -13
- package/corpus/templates/content/actions/refresh-content-database-source.ts +5 -5
- package/corpus/templates/content/app/components/editor/body-hydration.ts +35 -11
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +47 -5
- package/corpus/templates/content/app/hooks/use-documents.ts +8 -2
- package/corpus/templates/content/changelog/2026-07-08-builder-source-sync-now-completes-reliably-on-hosted-databases.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-fixed-builder-database-sync-so-large-sources-continue-past-t.md +6 -0
- package/corpus/templates/content/server/plugins/db.ts +19 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/videos/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/voice/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/agent/production-agent.d.ts +5 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +112 -42
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/tool-search.d.ts +2 -0
- package/dist/agent/tool-search.d.ts.map +1 -1
- package/dist/agent/tool-search.js +60 -4
- package/dist/agent/tool-search.js.map +1 -1
- package/dist/cli/index.js +19 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/upgrade.d.ts +100 -0
- package/dist/cli/upgrade.d.ts.map +1 -0
- package/dist/cli/upgrade.js +678 -0
- package/dist/cli/upgrade.js.map +1 -0
- package/dist/client/AssistantChat.js +1 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/HighlightedCodeBlock.d.ts +2 -0
- package/dist/client/HighlightedCodeBlock.d.ts.map +1 -1
- package/dist/client/HighlightedCodeBlock.js +10 -1
- package/dist/client/HighlightedCodeBlock.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +32 -4
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +61 -8
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +12 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +136 -42
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.js +2 -9
- package/dist/client/code-agent-chat-adapter.js.map +1 -1
- package/dist/client/session-replay.d.ts +0 -8
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +3 -80
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +52 -19
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsSection.d.ts +19 -4
- package/dist/client/settings/SettingsSection.d.ts.map +1 -1
- package/dist/client/settings/SettingsSection.js +33 -4
- package/dist/client/settings/SettingsSection.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +9 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +20 -2
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +85 -5
- package/dist/extensions/actions.js.map +1 -1
- package/dist/notifications/channels.d.ts +8 -3
- package/dist/notifications/channels.d.ts.map +1 -1
- package/dist/notifications/channels.js +61 -22
- package/dist/notifications/channels.js.map +1 -1
- package/dist/notifications/registry.d.ts.map +1 -1
- package/dist/notifications/registry.js +14 -3
- package/dist/notifications/registry.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/notifications/types.d.ts +4 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/notifications/types.js.map +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-chat-plugin.d.ts +5 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +2 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/request-context.d.ts +7 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/styles/agent-conversation.css +1 -1
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/default/AGENTS.md +10 -3
- package/dist/templates/default/package.json +2 -1
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/headless/AGENTS.md +9 -3
- package/dist/templates/headless/package.json +1 -0
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/workspace-root/AGENTS.md +10 -4
- package/dist/templates/workspace-root/package.json +1 -0
- package/docs/content/faq.mdx +17 -0
- package/docs/content/notifications.mdx +12 -6
- package/package.json +2 -2
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/default/AGENTS.md +10 -3
- package/src/templates/default/package.json +2 -1
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/headless/AGENTS.md +9 -3
- package/src/templates/headless/package.json +1 -0
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/workspace-root/AGENTS.md +10 -4
- package/src/templates/workspace-root/package.json +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-clamps-ultra-wide-viewports-while-keeping-the.md +0 -6
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Where a settings section is being rendered.
|
|
4
|
+
*
|
|
5
|
+
* - `sidebar`: the compact agent sidebar panel (dense, small type).
|
|
6
|
+
* - `page`: the full-width settings page, styled as a polished card that
|
|
7
|
+
* matches the shadcn `Card` surface used by app-owned settings tabs.
|
|
8
|
+
*/
|
|
9
|
+
export type SettingsSurface = "sidebar" | "page";
|
|
10
|
+
export declare function SettingsSurfaceProvider({ surface, children, }: {
|
|
11
|
+
surface: SettingsSurface;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function useSettingsSurface(): SettingsSurface;
|
|
2
15
|
interface SettingsSectionProps {
|
|
3
16
|
id?: string;
|
|
4
17
|
icon: ReactNode;
|
|
@@ -12,9 +25,11 @@ interface SettingsSectionProps {
|
|
|
12
25
|
children: ReactNode;
|
|
13
26
|
}
|
|
14
27
|
/**
|
|
15
|
-
* Collapsible settings section
|
|
16
|
-
*
|
|
28
|
+
* Collapsible settings section. Renders as a compact row in the agent sidebar
|
|
29
|
+
* and as a polished, shadcn-style card on the full settings page (so the
|
|
30
|
+
* framework tabs match app-owned General/Team cards). The visual surface is
|
|
31
|
+
* read from `SettingsSurfaceContext`.
|
|
17
32
|
*/
|
|
18
|
-
export declare function SettingsSection(
|
|
33
|
+
export declare function SettingsSection(props: SettingsSectionProps): import("react").JSX.Element;
|
|
19
34
|
export {};
|
|
20
35
|
//# sourceMappingURL=SettingsSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"SettingsSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsSection.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlE;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,CAAC;AAIjD,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAMA;AAED,wBAAgB,kBAAkB,IAAI,eAAe,CAEpD;AAED,UAAU,oBAAoB;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAO1D"}
|
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconChevronDown, IconCheck } from "@tabler/icons-react";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { cn } from "../utils.js";
|
|
5
|
+
const SettingsSurfaceContext = createContext("sidebar");
|
|
6
|
+
export function SettingsSurfaceProvider({ surface, children, }) {
|
|
7
|
+
return (_jsx(SettingsSurfaceContext.Provider, { value: surface, children: children }));
|
|
8
|
+
}
|
|
9
|
+
export function useSettingsSurface() {
|
|
10
|
+
return useContext(SettingsSurfaceContext);
|
|
11
|
+
}
|
|
3
12
|
/**
|
|
4
|
-
* Collapsible settings section
|
|
5
|
-
*
|
|
13
|
+
* Collapsible settings section. Renders as a compact row in the agent sidebar
|
|
14
|
+
* and as a polished, shadcn-style card on the full settings page (so the
|
|
15
|
+
* framework tabs match app-owned General/Team cards). The visual surface is
|
|
16
|
+
* read from `SettingsSurfaceContext`.
|
|
6
17
|
*/
|
|
7
|
-
export function SettingsSection(
|
|
8
|
-
|
|
18
|
+
export function SettingsSection(props) {
|
|
19
|
+
const surface = useSettingsSurface();
|
|
20
|
+
return surface === "page" ? (_jsx(PageSettingsSection, { ...props })) : (_jsx(SidebarSettingsSection, { ...props }));
|
|
21
|
+
}
|
|
22
|
+
function ConnectedDot({ size }) {
|
|
23
|
+
const dim = size === "sm" ? "h-4 w-4" : "h-5 w-5";
|
|
24
|
+
const stroke = size === "sm" ? 3 : 2.5;
|
|
25
|
+
const glyph = size === "sm" ? 10 : 12;
|
|
26
|
+
return (_jsx("span", { className: cn("flex shrink-0 items-center justify-center rounded-full bg-green-500/15 text-green-500", dim), children: _jsx(IconCheck, { size: glyph, stroke: stroke }) }));
|
|
27
|
+
}
|
|
28
|
+
function StatusBadge({ label, tone, size, }) {
|
|
29
|
+
return (_jsx("span", { className: cn("shrink-0 rounded-full font-semibold uppercase tracking-wide", size === "sm" ? "px-1.5 py-0.5 text-[9px]" : "px-2 py-0.5 text-[10px]", tone === "required"
|
|
30
|
+
? "bg-amber-500/15 text-amber-600 dark:text-amber-400"
|
|
31
|
+
: "bg-muted text-muted-foreground"), children: label }));
|
|
32
|
+
}
|
|
33
|
+
function PageSettingsSection({ id, icon, title, subtitle, badge, required, connected, open = false, onToggle, children, }) {
|
|
34
|
+
return (_jsxs("div", { id: id, className: cn("scroll-mt-16 overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm transition-colors", open ? "border-border" : "border-border/60"), children: [_jsxs("button", { type: "button", onClick: onToggle, "aria-expanded": open, className: "flex w-full items-start justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/40 sm:px-6 sm:py-5", children: [_jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [_jsx("span", { className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground [&>svg]:size-[18px]", children: icon }), _jsxs("span", { className: "flex min-w-0 flex-col gap-1.5", children: [_jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "text-base font-semibold leading-none tracking-tight text-foreground", children: title }), connected && _jsx(ConnectedDot, { size: "md" }), required && !connected && (_jsx(StatusBadge, { label: "Required", tone: "required", size: "md" })), badge && _jsx(StatusBadge, { label: badge, tone: "muted", size: "md" })] }), subtitle && (_jsx("span", { className: "text-sm leading-snug text-muted-foreground", children: subtitle }))] })] }), _jsx(IconChevronDown, { size: 18, className: cn("mt-1 shrink-0 text-muted-foreground transition-transform", open && "rotate-180") })] }), open && (_jsx("div", { className: "border-t border-border/60 px-5 pb-5 pt-5 sm:px-6 sm:pb-6", children: children }))] }));
|
|
35
|
+
}
|
|
36
|
+
function SidebarSettingsSection({ id, icon, title, subtitle, badge, required, connected, open = false, onToggle, children, }) {
|
|
37
|
+
return (_jsxs("div", { id: id, className: "rounded-lg border border-border bg-background/50", children: [_jsxs("button", { type: "button", onClick: onToggle, className: "flex w-full cursor-pointer items-center justify-between px-3 py-2.5 text-start rounded-lg hover:bg-accent/40 transition-colors", children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [_jsx("span", { className: "shrink-0 text-muted-foreground", children: icon }), _jsx("span", { className: "text-[12px] font-medium text-foreground truncate", children: title }), connected && _jsx(ConnectedDot, { size: "sm" }), required && !connected && (_jsx(StatusBadge, { label: "Required", tone: "muted", size: "sm" })), badge && _jsx(StatusBadge, { label: badge, tone: "muted", size: "sm" })] }), _jsx(IconChevronDown, { size: 12, className: `shrink-0 text-muted-foreground transition-transform ${open ? "rotate-180" : ""}` })] }), open && (_jsxs("div", { className: "border-t border-border px-3 pb-3 pt-2.5", children: [subtitle && (_jsx("p", { className: "text-[10px] text-muted-foreground mb-2.5", children: subtitle })), children] }))] }));
|
|
9
38
|
}
|
|
10
39
|
//# sourceMappingURL=SettingsSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsSection.js","sourceRoot":"","sources":["../../../src/client/settings/SettingsSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsSection.js","sourceRoot":"","sources":["../../../src/client/settings/SettingsSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAWjC,MAAM,sBAAsB,GAAG,aAAa,CAAkB,SAAS,CAAC,CAAC;AAEzE,MAAM,UAAU,uBAAuB,CAAC,EACtC,OAAO,EACP,QAAQ,GAIT;IACC,OAAO,CACL,KAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YAC5C,QAAQ,GACuB,CACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC;AAeD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACrC,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAC1B,KAAC,mBAAmB,OAAK,KAAK,GAAI,CACnC,CAAC,CAAC,CAAC,CACF,KAAC,sBAAsB,OAAK,KAAK,GAAI,CACtC,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,IAAI,EAAyB;IACnD,MAAM,GAAG,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAClD,MAAM,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC,MAAM,KAAK,GAAG,I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K,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,GAAG,IAC1D,EACN,KAAC,eAAe,IACd,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,uDAAuD,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,GAC5F,IACK,EACR,IAAI,IAAI,CACP,eAAK,SAAS,EAAC,yCAAyC,aACrD,QAAQ,IAAI,CACX,YAAG,SAAS,EAAC,0CAA0C,YACpD,QAAQ,GACP,CACL,EACA,QAAQ,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconChevronDown, IconCheck } from \"@tabler/icons-react\";\nimport { createContext, useContext, type ReactNode } from \"react\";\n\nimport { cn } from \"../utils.js\";\n\n/**\n * Where a settings section is being rendered.\n *\n * - `sidebar`: the compact agent sidebar panel (dense, small type).\n * - `page`: the full-width settings page, styled as a polished card that\n * matches the shadcn `Card` surface used by app-owned settings tabs.\n */\nexport type SettingsSurface = \"sidebar\" | \"page\";\n\nconst SettingsSurfaceContext = createContext<SettingsSurface>(\"sidebar\");\n\nexport function SettingsSurfaceProvider({\n surface,\n children,\n}: {\n surface: SettingsSurface;\n children: ReactNode;\n}) {\n return (\n <SettingsSurfaceContext.Provider value={surface}>\n {children}\n </SettingsSurfaceContext.Provider>\n );\n}\n\nexport function useSettingsSurface(): SettingsSurface {\n return useContext(SettingsSurfaceContext);\n}\n\ninterface SettingsSectionProps {\n id?: string;\n icon: ReactNode;\n title: string;\n subtitle?: string;\n badge?: string;\n required?: boolean;\n connected?: boolean;\n open?: boolean;\n onToggle?: () => void;\n children: ReactNode;\n}\n\n/**\n * Collapsible settings section. Renders as a compact row in the agent sidebar\n * and as a polished, shadcn-style card on the full settings page (so the\n * framework tabs match app-owned General/Team cards). The visual surface is\n * read from `SettingsSurfaceContext`.\n */\nexport function SettingsSection(props: SettingsSectionProps) {\n const surface = useSettingsSurface();\n return surface === \"page\" ? (\n <PageSettingsSection {...props} />\n ) : (\n <SidebarSettingsSection {...props} />\n );\n}\n\nfunction ConnectedDot({ size }: { size: \"sm\" | \"md\" }) {\n const dim = size === \"sm\" ? \"h-4 w-4\" : \"h-5 w-5\";\n const stroke = size === \"sm\" ? 3 : 2.5;\n const glyph = size === \"sm\" ? 10 : 12;\n return (\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-full bg-green-500/15 text-green-500\",\n dim,\n )}\n >\n <IconCheck size={glyph} stroke={stroke} />\n </span>\n );\n}\n\nfunction StatusBadge({\n label,\n tone,\n size,\n}: {\n label: string;\n tone: \"muted\" | \"required\";\n size: \"sm\" | \"md\";\n}) {\n return (\n <span\n className={cn(\n \"shrink-0 rounded-full font-semibold uppercase tracking-wide\",\n size === \"sm\" ? \"px-1.5 py-0.5 text-[9px]\" : \"px-2 py-0.5 text-[10px]\",\n tone === \"required\"\n ? \"bg-amber-500/15 text-amber-600 dark:text-amber-400\"\n : \"bg-muted text-muted-foreground\",\n )}\n >\n {label}\n </span>\n );\n}\n\nfunction PageSettingsSection({\n id,\n icon,\n title,\n subtitle,\n badge,\n required,\n connected,\n open = false,\n onToggle,\n children,\n}: SettingsSectionProps) {\n return (\n <div\n id={id}\n className={cn(\n \"scroll-mt-16 overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm transition-colors\",\n open ? \"border-border\" : \"border-border/60\",\n )}\n >\n <button\n type=\"button\"\n onClick={onToggle}\n aria-expanded={open}\n className=\"flex w-full items-start justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/40 sm:px-6 sm:py-5\"\n >\n <div className=\"flex min-w-0 items-start gap-3\">\n <span className=\"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground [&>svg]:size-[18px]\">\n {icon}\n </span>\n <span className=\"flex min-w-0 flex-col gap-1.5\">\n <span className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-base font-semibold leading-none tracking-tight text-foreground\">\n {title}\n </span>\n {connected && <ConnectedDot size=\"md\" />}\n {required && !connected && (\n <StatusBadge label=\"Required\" tone=\"required\" size=\"md\" />\n )}\n {badge && <StatusBadge label={badge} tone=\"muted\" size=\"md\" />}\n </span>\n {subtitle && (\n <span className=\"text-sm leading-snug text-muted-foreground\">\n {subtitle}\n </span>\n )}\n </span>\n </div>\n <IconChevronDown\n size={18}\n className={cn(\n \"mt-1 shrink-0 text-muted-foreground transition-transform\",\n open && \"rotate-180\",\n )}\n />\n </button>\n {open && (\n <div className=\"border-t border-border/60 px-5 pb-5 pt-5 sm:px-6 sm:pb-6\">\n {children}\n </div>\n )}\n </div>\n );\n}\n\nfunction SidebarSettingsSection({\n id,\n icon,\n title,\n subtitle,\n badge,\n required,\n connected,\n open = false,\n onToggle,\n children,\n}: SettingsSectionProps) {\n return (\n <div id={id} className=\"rounded-lg border border-border bg-background/50\">\n <button\n type=\"button\"\n onClick={onToggle}\n className=\"flex w-full cursor-pointer items-center justify-between px-3 py-2.5 text-start rounded-lg hover:bg-accent/40 transition-colors\"\n >\n <div className=\"flex items-center gap-2 min-w-0\">\n <span className=\"shrink-0 text-muted-foreground\">{icon}</span>\n <span className=\"text-[12px] font-medium text-foreground truncate\">\n {title}\n </span>\n {connected && <ConnectedDot size=\"sm\" />}\n {required && !connected && (\n <StatusBadge label=\"Required\" tone=\"muted\" size=\"sm\" />\n )}\n {badge && <StatusBadge label={badge} tone=\"muted\" size=\"sm\" />}\n </div>\n <IconChevronDown\n size={12}\n className={`shrink-0 text-muted-foreground transition-transform ${open ? \"rotate-180\" : \"\"}`}\n />\n </button>\n {open && (\n <div className=\"border-t border-border px-3 pb-3 pt-2.5\">\n {subtitle && (\n <p className=\"text-[10px] text-muted-foreground mb-2.5\">\n {subtitle}\n </p>\n )}\n {children}\n </div>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -4,6 +4,15 @@ import type { AgentMcpAppPayload } from "../mcp-client/app-result.js";
|
|
|
4
4
|
export type ContentPart = {
|
|
5
5
|
type: "text";
|
|
6
6
|
text: string;
|
|
7
|
+
} | {
|
|
8
|
+
/**
|
|
9
|
+
* Model chain-of-thought / extended-thinking prose. Streamed from
|
|
10
|
+
* server `thinking` SSE events (and code-agent thinking transcript
|
|
11
|
+
* items). Rendered as a collapsible plain-English cell — not a tool
|
|
12
|
+
* call.
|
|
13
|
+
*/
|
|
14
|
+
type: "reasoning";
|
|
15
|
+
text: string;
|
|
7
16
|
} | {
|
|
8
17
|
type: "tool-call";
|
|
9
18
|
toolCallId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse-event-processor.d.ts","sourceRoot":"","sources":["../../src/client/sse-event-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAQtE,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EA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,CAAC,EAAE,gBAAgB,GACzB,cAAc,CAAC,kBAAkB,CAAC,CA0LpC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,EAChC,OAAO,EAAE,WAAW,EAAE,EACtB,eAAe,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAClC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,EAC1C,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC7B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAqKf"}
|
|
@@ -429,7 +429,7 @@ function pendingToolNames(content) {
|
|
|
429
429
|
}
|
|
430
430
|
function contentSnapshot(content) {
|
|
431
431
|
return content.map((part) => {
|
|
432
|
-
if (part.type === "text")
|
|
432
|
+
if (part.type === "text" || part.type === "reasoning")
|
|
433
433
|
return { ...part };
|
|
434
434
|
return {
|
|
435
435
|
...part,
|
|
@@ -651,6 +651,24 @@ export function processEvent(ev, content, toolCallCounter, tabId, state) {
|
|
|
651
651
|
result: { content: contentSnapshot(content) },
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
+
if (ev.type === "thinking") {
|
|
655
|
+
// Model chain-of-thought. Coalesce consecutive deltas into one reasoning
|
|
656
|
+
// part so the UI can render a single collapsible "Thinking" cell.
|
|
657
|
+
const delta = ev.text ?? "";
|
|
658
|
+
if (!delta)
|
|
659
|
+
return { action: "continue" };
|
|
660
|
+
const lastPart = content[content.length - 1];
|
|
661
|
+
if (lastPart && lastPart.type === "reasoning") {
|
|
662
|
+
lastPart.text += delta;
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
content.push({ type: "reasoning", text: delta });
|
|
666
|
+
}
|
|
667
|
+
return {
|
|
668
|
+
action: "yield",
|
|
669
|
+
result: { content: contentSnapshot(content) },
|
|
670
|
+
};
|
|
671
|
+
}
|
|
654
672
|
if (ev.type === "stream_keepalive") {
|
|
655
673
|
return { action: "continue" };
|
|
656
674
|
}
|
|
@@ -1061,7 +1079,7 @@ function clearAssistantDraftContent(content) {
|
|
|
1061
1079
|
const part = content[index];
|
|
1062
1080
|
if (!part)
|
|
1063
1081
|
continue;
|
|
1064
|
-
if (part.type === "text") {
|
|
1082
|
+
if (part.type === "text" || part.type === "reasoning") {
|
|
1065
1083
|
content.splice(index, 1);
|
|
1066
1084
|
continue;
|
|
1067
1085
|
}
|