@agent-native/core 0.84.57 → 0.84.58
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 +1 -1
- package/corpus/core/CHANGELOG.md +8 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/action.ts +11 -0
- package/corpus/core/src/agent/production-agent.ts +24 -46
- package/corpus/core/src/client/AssistantChat.tsx +69 -12
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +1 -1
- package/corpus/core/src/client/conversation/use-near-bottom-autoscroll.ts +45 -2
- package/corpus/core/src/coding-tools/run-code.ts +1 -0
- package/corpus/core/src/integrations/webhook-handler.ts +10 -9
- package/corpus/core/src/server/action-discovery.ts +3 -0
- package/corpus/core/src/server/credential-provider.ts +11 -6
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +29 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +9 -1
- package/corpus/templates/design/actions/list-design-extensions.ts +2 -2
- package/corpus/templates/design/app/components/design/CodeWorkbenchHost.tsx +11 -89
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +314 -181
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +92 -134
- package/corpus/templates/design/app/components/design/EditPanel.tsx +93 -19
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +18 -26
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +220 -192
- package/corpus/templates/design/app/components/design/code-workbench-theme.ts +150 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +5 -7
- package/corpus/templates/design/app/i18n-data.ts +61 -77
- package/corpus/templates/design/app/lib/design-import.ts +4 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +97 -48
- package/corpus/templates/design/changelog/2026-07-02-design-inspector-and-canvas-controls-stay-consistent-when-se.md +6 -0
- package/corpus/templates/design/changelog/2026-07-02-fixed-a-crash-when-opening-the-code-editor.md +6 -0
- package/corpus/templates/design/changelog/2026-07-02-fixed-motion-drawer-open-transition.md +6 -0
- package/corpus/templates/design/changelog/2026-07-02-improved-design-assets-panel.md +6 -0
- package/dist/action.d.ts +8 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +3 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +10 -11
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +21 -44
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +1 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +61 -11
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/conversation/use-near-bottom-autoscroll.d.ts.map +1 -1
- package/dist/client/conversation/use-near-bottom-autoscroll.js +43 -2
- package/dist/client/conversation/use-near-bottom-autoscroll.js.map +1 -1
- package/dist/coding-tools/run-code.d.ts.map +1 -1
- package/dist/coding-tools/run-code.js +1 -0
- package/dist/coding-tools/run-code.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/integrations/webhook-handler.d.ts +1 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +9 -9
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +3 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/credential-provider.d.ts +4 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +13 -7
- package/dist/server/credential-provider.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,10 +28,11 @@ import { Button } from "@/components/ui/button";
|
|
|
28
28
|
import { Spinner } from "@/components/ui/spinner";
|
|
29
29
|
import { cn } from "@/lib/utils";
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
import {
|
|
32
|
+
normalizeMonacoThemeColor,
|
|
33
|
+
readCodeWorkbenchTheme,
|
|
34
|
+
type CodeWorkbenchTheme,
|
|
35
|
+
} from "./code-workbench-theme";
|
|
35
36
|
|
|
36
37
|
interface CodeWorkbenchDraft {
|
|
37
38
|
content: string;
|
|
@@ -56,87 +57,6 @@ interface CodeWorkbenchHostProps {
|
|
|
56
57
|
onActiveFileChange?: (file: CodeWorkbenchActiveFile | null) => void;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
const WORKBENCH_THEME_VARS: Record<string, string[]> = {
|
|
60
|
-
"--workbench-bg": ["--design-editor-panel-bg", "--background"],
|
|
61
|
-
"--workbench-sidebar-bg": ["--design-editor-panel-bg", "--card"],
|
|
62
|
-
"--workbench-editor-bg": ["--design-editor-panel-bg", "--background"],
|
|
63
|
-
"--workbench-surface-bg": ["--design-editor-control-bg", "--muted"],
|
|
64
|
-
"--workbench-border": ["--design-editor-control-border", "--border"],
|
|
65
|
-
"--workbench-fg": ["--foreground"],
|
|
66
|
-
"--workbench-muted-fg": ["--muted-foreground"],
|
|
67
|
-
"--workbench-hover-bg": ["--design-editor-layer-hover-color", "--accent"],
|
|
68
|
-
"--workbench-active-bg": ["--design-editor-selection-color", "--accent"],
|
|
69
|
-
"--workbench-active-fg": [
|
|
70
|
-
"--design-editor-accent-color",
|
|
71
|
-
"--accent-foreground",
|
|
72
|
-
],
|
|
73
|
-
"--workbench-accent": ["--design-editor-accent-color", "--primary"],
|
|
74
|
-
"--workbench-button-bg": ["--design-editor-control-bg", "--background"],
|
|
75
|
-
"--workbench-button-fg": ["--foreground"],
|
|
76
|
-
"--workbench-selection-bg": ["--design-editor-selection-color", "--accent"],
|
|
77
|
-
"--workbench-dirty": ["--warning", "--destructive"],
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
function normalizeThemeColorValue(value: string): string {
|
|
81
|
-
const trimmed = value.trim();
|
|
82
|
-
if (!trimmed) return "";
|
|
83
|
-
if (/^-?\d+(\.\d+)?\s+-?\d+(\.\d+)?%/.test(trimmed)) {
|
|
84
|
-
return `hsl(${trimmed})`;
|
|
85
|
-
}
|
|
86
|
-
return trimmed;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function resolveCssColorValue(value: string): string {
|
|
90
|
-
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
const probe = document.createElement("span");
|
|
94
|
-
probe.style.color = value;
|
|
95
|
-
probe.style.position = "fixed";
|
|
96
|
-
probe.style.pointerEvents = "none";
|
|
97
|
-
probe.style.visibility = "hidden";
|
|
98
|
-
document.body.appendChild(probe);
|
|
99
|
-
const resolved = window.getComputedStyle(probe).color;
|
|
100
|
-
probe.remove();
|
|
101
|
-
return resolved || value;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function readThemeVar(
|
|
105
|
-
elementStyles: CSSStyleDeclaration,
|
|
106
|
-
rootStyles: CSSStyleDeclaration,
|
|
107
|
-
names: string[],
|
|
108
|
-
): string | undefined {
|
|
109
|
-
for (const name of names) {
|
|
110
|
-
const value =
|
|
111
|
-
elementStyles.getPropertyValue(name) || rootStyles.getPropertyValue(name);
|
|
112
|
-
const normalized = normalizeThemeColorValue(value);
|
|
113
|
-
if (normalized) return resolveCssColorValue(normalized);
|
|
114
|
-
}
|
|
115
|
-
return undefined;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function readCodeWorkbenchTheme(
|
|
119
|
-
element: HTMLElement | null,
|
|
120
|
-
): CodeWorkbenchTheme {
|
|
121
|
-
if (typeof window === "undefined" || !element) {
|
|
122
|
-
return { colorScheme: "light", values: {} };
|
|
123
|
-
}
|
|
124
|
-
const elementStyles = window.getComputedStyle(element);
|
|
125
|
-
const rootStyles = window.getComputedStyle(document.documentElement);
|
|
126
|
-
const values: Record<string, string> = {};
|
|
127
|
-
for (const [targetVar, sourceVars] of Object.entries(WORKBENCH_THEME_VARS)) {
|
|
128
|
-
const value = readThemeVar(elementStyles, rootStyles, sourceVars);
|
|
129
|
-
if (value) values[targetVar] = value;
|
|
130
|
-
}
|
|
131
|
-
const colorScheme =
|
|
132
|
-
document.documentElement.classList.contains("dark") ||
|
|
133
|
-
elementStyles.colorScheme.includes("dark") ||
|
|
134
|
-
rootStyles.colorScheme.includes("dark")
|
|
135
|
-
? "dark"
|
|
136
|
-
: "light";
|
|
137
|
-
return { colorScheme, values };
|
|
138
|
-
}
|
|
139
|
-
|
|
140
60
|
let monacoEnvironmentInstalled = false;
|
|
141
61
|
|
|
142
62
|
function ensureMonacoEnvironment() {
|
|
@@ -210,10 +130,12 @@ function defineMonacoTheme(theme: CodeWorkbenchTheme): string {
|
|
|
210
130
|
"editorWidget.background": values["--workbench-surface-bg"],
|
|
211
131
|
"editorWidget.border": values["--workbench-border"],
|
|
212
132
|
focusBorder: values["--workbench-accent"],
|
|
213
|
-
})
|
|
214
|
-
(
|
|
215
|
-
|
|
216
|
-
|
|
133
|
+
})
|
|
134
|
+
.map(([key, value]) => [key, normalizeMonacoThemeColor(value)] as const)
|
|
135
|
+
.filter(
|
|
136
|
+
(entry): entry is [string, string] =>
|
|
137
|
+
typeof entry[1] === "string" && entry[1].length > 0,
|
|
138
|
+
),
|
|
217
139
|
);
|
|
218
140
|
monaco.editor.defineTheme(name, {
|
|
219
141
|
base: dark ? "vs-dark" : "vs",
|