@agent-native/core 0.36.0 → 0.37.1
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/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +72 -10
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +78 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +8 -4
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +14 -10
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/extensions/SkillReference.js +1 -1
- package/dist/client/composer/extensions/SkillReference.js.map +1 -1
- package/dist/client/dynamic-suggestions.d.ts +13 -7
- package/dist/client/dynamic-suggestions.d.ts.map +1 -1
- package/dist/client/dynamic-suggestions.js +23 -12
- package/dist/client/dynamic-suggestions.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +2 -2
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/route-state.d.ts +116 -0
- package/dist/client/route-state.d.ts.map +1 -0
- package/dist/client/route-state.js +205 -0
- package/dist/client/route-state.js.map +1 -0
- package/dist/resources/store.js +4 -4
- package/dist/resources/store.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +92 -56
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agents-bundle.d.ts +6 -4
- package/dist/server/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +20 -12
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/templates/default/AGENTS.md +16 -8
- package/dist/templates/default/app/hooks/use-navigation-state.ts +10 -76
- package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
- package/dist/vite/agents-bundle-plugin.js +16 -6
- package/dist/vite/agents-bundle-plugin.js.map +1 -1
- package/docs/content/context-awareness.md +90 -48
- package/docs/content/creating-templates.md +22 -1
- package/docs/content/workspace.md +3 -3
- package/package.json +2 -1
- package/src/templates/default/AGENTS.md +16 -8
- package/src/templates/default/app/hooks/use-navigation-state.ts +10 -76
|
@@ -4,7 +4,7 @@ import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
|
|
|
4
4
|
import { IconStack2 } from "@tabler/icons-react";
|
|
5
5
|
const SkillReferenceComponent = ({ node }) => {
|
|
6
6
|
const displayName = (node.attrs.name || node.attrs.path || "")
|
|
7
|
-
.replace(/^(\.agents
|
|
7
|
+
.replace(/^(\.agents?\/)?skills\//, "")
|
|
8
8
|
.replace(/\/SKILL\.md$/i, "")
|
|
9
9
|
.replace(/\.md$/i, "")
|
|
10
10
|
.split("/")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillReference.js","sourceRoot":"","sources":["../../../../src/client/composer/extensions/SkillReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,uBAAuB,GAAG,CAAC,EAAE,IAAI,EAAiB,EAAE,EAAE;IAC1D,MAAM,WAAW,GACf,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;SACvC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"SkillReference.js","sourceRoot":"","sources":["../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,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SAChC,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,EAAE,GAAG,EAAE,mCAAmC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO;YACL,MAAM;YACN,eAAe,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,cAAc,CAAC;SACpE,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { NodeViewWrapper, ReactNodeViewRenderer } from \"@tiptap/react\";\nimport { IconStack2 } from \"@tabler/icons-react\";\n\nconst SkillReferenceComponent = ({ node }: { node: any }) => {\n const displayName =\n (node.attrs.name || node.attrs.path || \"\")\n .replace(/^(\\.agents?\\/)?skills\\//, \"\")\n .replace(/\\/SKILL\\.md$/i, \"\")\n .replace(/\\.md$/i, \"\")\n .split(\"/\")\n .pop() || \"skill\";\n\n return (\n <NodeViewWrapper as=\"span\" className=\"inline\">\n <span\n className=\"inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[160px] select-none\"\n title={node.attrs.path}\n >\n <IconStack2 size={14} className=\"shrink-0 text-muted-foreground\" />\n <span className=\"truncate\">{displayName}</span>\n </span>\n </NodeViewWrapper>\n );\n};\n\nexport const SkillReference = Node.create({\n name: \"skillReference\",\n group: \"inline\",\n inline: true,\n selectable: true,\n atom: true,\n\n addAttributes() {\n return {\n name: { default: null },\n path: { default: null },\n source: { default: \"codebase\" },\n };\n },\n\n parseHTML() {\n return [{ tag: 'span[data-type=\"skill-reference\"]' }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"span\",\n mergeAttributes({ \"data-type\": \"skill-reference\" }, HTMLAttributes),\n ];\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(SkillReferenceComponent);\n },\n});\n"]}
|
|
@@ -17,6 +17,17 @@ export interface AgentDynamicSuggestionsConfig {
|
|
|
17
17
|
getSuggestions?: (context: AgentDynamicSuggestionContext) => string[];
|
|
18
18
|
}
|
|
19
19
|
export type AgentDynamicSuggestionsOption = boolean | AgentDynamicSuggestionsConfig;
|
|
20
|
+
export interface AgentDynamicSuggestionsResult {
|
|
21
|
+
suggestions: string[] | undefined;
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface UseAgentDynamicSuggestionsOptions {
|
|
25
|
+
staticSuggestions?: readonly string[];
|
|
26
|
+
dynamicSuggestions?: AgentDynamicSuggestionsOption;
|
|
27
|
+
browserTabId?: string;
|
|
28
|
+
scope?: ChatThreadScope | null;
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
}
|
|
20
31
|
interface NormalizedAgentDynamicSuggestionsConfig {
|
|
21
32
|
enabled: boolean;
|
|
22
33
|
max: number;
|
|
@@ -32,12 +43,7 @@ export declare function mergeAgentSuggestions(options: {
|
|
|
32
43
|
includeStatic: boolean;
|
|
33
44
|
max: number;
|
|
34
45
|
}): string[];
|
|
35
|
-
export declare function
|
|
36
|
-
|
|
37
|
-
dynamicSuggestions?: AgentDynamicSuggestionsOption;
|
|
38
|
-
browserTabId?: string;
|
|
39
|
-
scope?: ChatThreadScope | null;
|
|
40
|
-
enabled?: boolean;
|
|
41
|
-
}): string[] | undefined;
|
|
46
|
+
export declare function useAgentDynamicSuggestionsResult(options: UseAgentDynamicSuggestionsOptions): AgentDynamicSuggestionsResult;
|
|
47
|
+
export declare function useAgentDynamicSuggestions(options: UseAgentDynamicSuggestionsOptions): string[] | undefined;
|
|
42
48
|
export {};
|
|
43
49
|
//# sourceMappingURL=dynamic-suggestions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-suggestions.d.ts","sourceRoot":"","sources":["../../src/client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,CAAC,OAAO,EAAE,6BAA6B,KAAK,MAAM,EAAE,CAAC;CACvE;AAED,wBAAgB,sCAAsC,CACpD,MAAM,CAAC,EAAE,6BAA6B,GACrC,uCAAuC,CAwBzC;AAyID,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,6BAA6B,GACrC,MAAM,EAAE,CAmFV;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAY1E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,aAAa,EAAE,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,MAAM,EAAE,CAWX;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,iCAAiC,GACzC,6BAA6B,CA2G/B;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,GACzC,MAAM,EAAE,GAAG,SAAS,CAEtB"}
|
|
@@ -254,7 +254,7 @@ export function mergeAgentSuggestions(options) {
|
|
|
254
254
|
: [...options.dynamicSuggestions];
|
|
255
255
|
return dedupeSuggestions(merged).slice(0, options.max);
|
|
256
256
|
}
|
|
257
|
-
export function
|
|
257
|
+
export function useAgentDynamicSuggestionsResult(options) {
|
|
258
258
|
const config = useMemo(() => normalizeAgentDynamicSuggestionsConfig(options.dynamicSuggestions), [options.dynamicSuggestions]);
|
|
259
259
|
const browserTabId = useMemo(() => normalizeBrowserTabId(options.browserTabId), [options.browserTabId]);
|
|
260
260
|
const optionScope = options.scope ?? null;
|
|
@@ -271,13 +271,17 @@ export function useAgentDynamicSuggestions(options) {
|
|
|
271
271
|
const appStateVersion = useChangeVersions(["app-state"]);
|
|
272
272
|
const enabled = options.enabled !== false && config.enabled;
|
|
273
273
|
const [context, setContext] = useState(null);
|
|
274
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
274
275
|
useEffect(() => {
|
|
275
276
|
if (!enabled) {
|
|
276
277
|
setContext(null);
|
|
278
|
+
setIsLoading(false);
|
|
277
279
|
return;
|
|
278
280
|
}
|
|
279
281
|
let cancelled = false;
|
|
280
|
-
const load = async () => {
|
|
282
|
+
const load = async (showLoading) => {
|
|
283
|
+
if (showLoading)
|
|
284
|
+
setIsLoading(true);
|
|
281
285
|
try {
|
|
282
286
|
const [navigation, selection, pendingSelection, url] = await Promise.all([
|
|
283
287
|
readScopedAppState("navigation", browserTabId),
|
|
@@ -306,29 +310,29 @@ export function useAgentDynamicSuggestions(options) {
|
|
|
306
310
|
scope,
|
|
307
311
|
});
|
|
308
312
|
}
|
|
313
|
+
finally {
|
|
314
|
+
if (!cancelled && showLoading)
|
|
315
|
+
setIsLoading(false);
|
|
316
|
+
}
|
|
309
317
|
};
|
|
310
|
-
void load();
|
|
318
|
+
void load(true);
|
|
311
319
|
const interval = setInterval(() => {
|
|
312
|
-
void load();
|
|
320
|
+
void load(false);
|
|
313
321
|
}, 2_000);
|
|
314
322
|
return () => {
|
|
315
323
|
cancelled = true;
|
|
316
324
|
clearInterval(interval);
|
|
317
325
|
};
|
|
318
326
|
}, [appStateVersion, browserTabId, enabled, scope, scopeKey]);
|
|
319
|
-
|
|
327
|
+
const suggestions = useMemo(() => {
|
|
320
328
|
if (!enabled) {
|
|
321
329
|
return options.staticSuggestions
|
|
322
330
|
? dedupeSuggestions(options.staticSuggestions)
|
|
323
331
|
: undefined;
|
|
324
332
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
pendingSelection: null,
|
|
329
|
-
url: null,
|
|
330
|
-
scope,
|
|
331
|
-
};
|
|
333
|
+
if (context === null)
|
|
334
|
+
return undefined;
|
|
335
|
+
const ctx = context;
|
|
332
336
|
const dynamic = config.getSuggestions
|
|
333
337
|
? config.getSuggestions(ctx)
|
|
334
338
|
: buildDynamicAgentSuggestions(ctx);
|
|
@@ -340,5 +344,12 @@ export function useAgentDynamicSuggestions(options) {
|
|
|
340
344
|
});
|
|
341
345
|
return merged.length > 0 ? merged : undefined;
|
|
342
346
|
}, [config, context, enabled, scope, scopeKey, options.staticSuggestions]);
|
|
347
|
+
return {
|
|
348
|
+
suggestions,
|
|
349
|
+
isLoading: enabled && (context === null || isLoading),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
export function useAgentDynamicSuggestions(options) {
|
|
353
|
+
return useAgentDynamicSuggestionsResult(options).suggestions;
|
|
343
354
|
}
|
|
344
355
|
//# sourceMappingURL=dynamic-suggestions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-suggestions.js","sourceRoot":"","sources":["../../src/client/dynamic-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AACvD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAgClC,MAAM,UAAU,sCAAsC,CACpD,MAAsC;IAEtC,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,GAAG,EAAE,uBAAuB;YAC5B,aAAa,EAAE,IAAI;SACpB,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,IAAI;YACb,GAAG,EAAE,uBAAuB;YAC5B,aAAa,EAAE,IAAI;SACpB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO,KAAK,KAAK;QACjC,GAAG,EACD,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,IAAI,MA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a,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE9D,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,iBAAiB;gBAC9B,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC9C,CAAC,CAAC,SAAS,CAAC;QAChB,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,IAAI;YACrB,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,IAAI;YACf,gBAAgB,EAAE,IAAI;YACtB,GAAG,EAAE,IAAI;YACT,KAAK;SACN,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc;YACnC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC;YAC5B,CAAC,CAAC,4BAA4B,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,qBAAqB,CAAC;YACnC,kBAAkB,EAAE,OAAO;YAC3B,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,GAAG,EAAE,MAAM,CAAC,GAAG;SAChB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAChD,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { agentNativePath } from \"./api-path.js\";\nimport { useChangeVersions } from \"./use-change-version.js\";\nimport type { ChatThreadScope } from \"./use-chat-threads.js\";\n\nconst SAFE_BROWSER_TAB_ID_RE = /^[A-Za-z0-9_-]{1,96}$/;\nconst DEFAULT_MAX_SUGGESTIONS = 4;\n\nexport interface AgentDynamicSuggestionContext {\n navigation: unknown;\n selection: unknown;\n pendingSelection: unknown;\n url: unknown;\n scope?: ChatThreadScope | null;\n}\n\nexport interface AgentDynamicSuggestionsConfig {\n /** Enable/disable dynamic suggestions. Defaults to true. */\n enabled?: boolean;\n /** Maximum number of suggestion chips after merging dynamic + static. */\n max?: number;\n /** Keep the caller-provided static suggestions after dynamic ones. Default true. */\n includeStatic?: boolean;\n /** Optional app-specific deterministic suggestion builder. */\n getSuggestions?: (context: AgentDynamicSuggestionContext) => string[];\n}\n\nexport type AgentDynamicSuggestionsOption =\n | boolean\n | AgentDynamicSuggestionsConfig;\n\ninterface NormalizedAgentDynamicSuggestionsConfig {\n enabled: boolean;\n max: number;\n includeStatic: boolean;\n getSuggestions?: (context: AgentDynamicSuggestionContext) => string[];\n}\n\nexport function normalizeAgentDynamicSuggestionsConfig(\n option?: AgentDynamicSuggestionsOption,\n): NormalizedAgentDynamicSuggestionsConfig {\n if (option === false) {\n return {\n enabled: false,\n max: DEFAULT_MAX_SUGGESTIONS,\n includeStatic: true,\n };\n }\n if (option === true || option === undefined) {\n return {\n enabled: true,\n max: DEFAULT_MAX_SUGGESTIONS,\n includeStatic: true,\n };\n }\n return {\n enabled: option.enabled !== false,\n max:\n typeof option.max === \"number\" && Number.isFinite(option.max)\n ? Math.max(1, Math.floor(option.max))\n : DEFAULT_MAX_SUGGESTIONS,\n includeStatic: option.includeStatic !== false,\n ...(option.getSuggestions ? { getSuggestions: option.getSuggestions } : {}),\n };\n}\n\nfunction normalizeBrowserTabId(browserTabId?: string): string | undefined {\n if (typeof browserTabId !== \"string\") return undefined;\n const trimmed = browserTabId.trim();\n return SAFE_BROWSER_TAB_ID_RE.test(trimmed) ? trimmed : undefined;\n}\n\nfunction appStateKeyForBrowserTab(key: string, browserTabId?: string): string {\n return browserTabId ? `${key}:${browserTabId}` : key;\n}\n\nasync function readAppState(key: string): Promise<unknown> {\n const res = await fetch(\n agentNativePath(`/_agent-native/application-state/${key}`),\n );\n if (!res.ok || res.status === 204) return null;\n const text = await res.text();\n if (!text) return null;\n try {\n return JSON.parse(text);\n } catch {\n return null;\n }\n}\n\nasync function readScopedAppState(\n key: string,\n browserTabId?: string,\n): Promise<unknown> {\n if (browserTabId) {\n const scoped = await readAppState(\n appStateKeyForBrowserTab(key, browserTabId),\n );\n if (scoped !== null && scoped !== undefined) return scoped;\n }\n return readAppState(key);\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return null;\n return value as Record<string, unknown>;\n}\n\nfunction stringValue(record: Record<string, unknown> | null, key: string) {\n const value = record?.[key];\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction numberValue(record: Record<string, unknown> | null, key: string) {\n const value = record?.[key];\n return typeof value === \"number\" && Number.isFinite(value)\n ? value\n : undefined;\n}\n\nfunction humanizeIdentifier(value: string): string {\n return value\n .replace(/[_-]+/g, \" \")\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .trim()\n .replace(/\\s+/g, \" \")\n .toLowerCase();\n}\n\nfunction hasSelection(value: unknown): boolean {\n if (typeof value === \"string\") return value.trim().length > 0;\n const record = asRecord(value);\n if (!record) return false;\n if (stringValue(record, \"text\")) return true;\n const items = record.items;\n if (Array.isArray(items) && items.length > 0) return true;\n const ranges = record.ranges;\n if (Array.isArray(ranges) && ranges.length > 0) return true;\n return false;\n}\n\nfunction inferSurface(context: AgentDynamicSuggestionContext): {\n kind: string;\n label: string;\n slideNumber?: number;\n} | null {\n const nav = asRecord(context.navigation);\n const scope = context.scope;\n const view = stringValue(nav, \"view\");\n const scopeType = scope?.type ? humanizeIdentifier(scope.type) : undefined;\n const scopeLabel = scope?.label?.trim();\n const slideNumber = numberValue(nav, \"slideNumber\");\n const slideIndex = numberValue(nav, \"slideIndex\");\n\n if (slideNumber !== undefined || slideIndex !== undefined) {\n return {\n kind: \"slide\",\n label: \"slide\",\n slideNumber: slideNumber ?? (slideIndex ?? 0) + 1,\n };\n }\n if (stringValue(nav, \"threadId\")) return { kind: \"thread\", label: \"thread\" };\n if (stringValue(nav, \"focusedEmailId\") || stringValue(nav, \"emailId\")) {\n return { kind: \"email\", label: \"email\" };\n }\n if (stringValue(nav, \"deckId\") || scopeType === \"deck\") {\n return { kind: \"deck\", label: scopeLabel || \"deck\" };\n }\n if (stringValue(nav, \"dashboardId\") || scopeType === \"dashboard\") {\n return { kind: \"dashboard\", label: scopeLabel || \"dashboard\" };\n }\n if (stringValue(nav, \"chartId\")) return { kind: \"chart\", label: \"chart\" };\n if (stringValue(nav, \"formId\") || scopeType === \"form\") {\n return { kind: \"form\", label: scopeLabel || \"form\" };\n }\n if (stringValue(nav, \"documentId\") || stringValue(nav, \"docId\")) {\n return { kind: \"document\", label: scopeLabel || \"document\" };\n }\n if (stringValue(nav, \"eventId\") || view === \"event\") {\n return { kind: \"event\", label: \"event\" };\n }\n if (\n stringValue(nav, \"meetingId\") ||\n stringValue(nav, \"callId\") ||\n view === \"meeting\" ||\n view === \"call\"\n ) {\n return { kind: \"meeting\", label: \"meeting\" };\n }\n if (\n stringValue(nav, \"clipId\") ||\n stringValue(nav, \"recordingId\") ||\n stringValue(nav, \"videoId\")\n ) {\n return { kind: \"recording\", label: \"recording\" };\n }\n if (scopeType && scopeLabel) return { kind: scopeType, label: scopeLabel };\n if (view) return { kind: view, label: humanizeIdentifier(view) };\n return null;\n}\n\nexport function buildDynamicAgentSuggestions(\n context: AgentDynamicSuggestionContext,\n): string[] {\n const suggestions: string[] = [];\n const selected =\n hasSelection(context.selection) || hasSelection(context.pendingSelection);\n const surface = inferSurface(context);\n\n if (!selected && !surface) {\n return [];\n }\n\n if (selected) {\n suggestions.push(\"Summarize this selection\");\n suggestions.push(\"Rewrite this selection\");\n }\n\n switch (surface?.kind) {\n case \"slide\":\n suggestions.push(\n surface.slideNumber\n ? `Improve slide ${surface.slideNumber}`\n : \"Improve this slide\",\n );\n suggestions.push(\"Make this slide more concise\");\n suggestions.push(\"Add speaker notes for this slide\");\n break;\n case \"deck\":\n suggestions.push(`Summarize this ${surface.label}`);\n suggestions.push(`Improve this ${surface.label}`);\n suggestions.push(\"Create a stronger outline\");\n break;\n case \"thread\":\n case \"email\":\n suggestions.push(\"Summarize this thread\");\n suggestions.push(\"Draft a reply\");\n suggestions.push(\"Find the action items\");\n break;\n case \"dashboard\":\n case \"chart\":\n suggestions.push(`Explain this ${surface.label}`);\n suggestions.push(\"Find anomalies in this data\");\n suggestions.push(\"Suggest a follow-up chart\");\n break;\n case \"form\":\n suggestions.push(`Improve this ${surface.label}`);\n suggestions.push(\"Suggest better questions\");\n suggestions.push(\"Summarize recent responses\");\n break;\n case \"document\":\n suggestions.push(`Summarize this ${surface.label}`);\n suggestions.push(`Improve this ${surface.label}`);\n suggestions.push(\"Find the action items\");\n break;\n case \"event\":\n suggestions.push(\"Prepare me for this event\");\n suggestions.push(\"Draft a follow-up\");\n suggestions.push(\"Find scheduling conflicts\");\n break;\n case \"meeting\":\n case \"recording\":\n suggestions.push(`Summarize this ${surface.label}`);\n suggestions.push(\"Extract action items\");\n suggestions.push(\"Create a shareable summary\");\n break;\n case \"settings\":\n suggestions.push(\"Explain these settings\");\n suggestions.push(\"Help me configure this screen\");\n break;\n case \"list\":\n case \"home\":\n case \"overview\":\n suggestions.push(\"What should I do next here?\");\n suggestions.push(\"Explain what I am looking at\");\n break;\n default:\n if (surface?.label) {\n suggestions.push(`Help me with this ${surface.label}`);\n }\n suggestions.push(\"Explain what I am looking at\");\n suggestions.push(\"Suggest next steps\");\n break;\n }\n\n return dedupeSuggestions(suggestions);\n}\n\nexport function dedupeSuggestions(suggestions: readonly string[]): string[] {\n const seen = new Set<string>();\n const result: string[] = [];\n for (const suggestion of suggestions) {\n const trimmed = suggestion.trim();\n if (!trimmed) continue;\n const key = trimmed.toLowerCase();\n if (seen.has(key)) continue;\n seen.add(key);\n result.push(trimmed);\n }\n return result;\n}\n\nexport function mergeAgentSuggestions(options: {\n dynamicSuggestions: readonly string[];\n staticSuggestions?: readonly string[];\n includeStatic: boolean;\n max: number;\n}): string[] {\n if (options.dynamicSuggestions.length === 0) {\n return options.includeStatic\n ? dedupeSuggestions(options.staticSuggestions ?? [])\n : [];\n }\n\n const merged = options.includeStatic\n ? [...options.dynamicSuggestions, ...(options.staticSuggestions ?? [])]\n : [...options.dynamicSuggestions];\n return dedupeSuggestions(merged).slice(0, options.max);\n}\n\nexport function useAgentDynamicSuggestions(options: {\n staticSuggestions?: readonly string[];\n dynamicSuggestions?: AgentDynamicSuggestionsOption;\n browserTabId?: string;\n scope?: ChatThreadScope | null;\n enabled?: boolean;\n}): string[] | undefined {\n const config = useMemo(\n () => normalizeAgentDynamicSuggestionsConfig(options.dynamicSuggestions),\n [options.dynamicSuggestions],\n );\n const browserTabId = useMemo(\n () => normalizeBrowserTabId(options.browserTabId),\n [options.browserTabId],\n );\n const optionScope = options.scope ?? null;\n const scope = useMemo<ChatThreadScope | null>(\n () =>\n optionScope\n ? {\n type: optionScope.type,\n id: optionScope.id,\n ...(optionScope.label ? { label: optionScope.label } : {}),\n }\n : null,\n [optionScope?.type, optionScope?.id, optionScope?.label],\n );\n const scopeKey = scope\n ? `${scope.type}:${scope.id}:${scope.label ?? \"\"}`\n : \"none\";\n const appStateVersion = useChangeVersions([\"app-state\"]);\n const enabled = options.enabled !== false && config.enabled;\n const [context, setContext] = useState<AgentDynamicSuggestionContext | null>(\n null,\n );\n\n useEffect(() => {\n if (!enabled) {\n setContext(null);\n return;\n }\n\n let cancelled = false;\n const load = async () => {\n try {\n const [navigation, selection, pendingSelection, url] =\n await Promise.all([\n readScopedAppState(\"navigation\", browserTabId),\n readScopedAppState(\"selection\", browserTabId),\n readScopedAppState(\"pending-selection-context\", browserTabId),\n readScopedAppState(\"__url__\", browserTabId),\n ]);\n if (cancelled) return;\n setContext({\n navigation,\n selection,\n pendingSelection,\n url,\n scope,\n });\n } catch {\n if (cancelled) return;\n setContext({\n navigation: null,\n selection: null,\n pendingSelection: null,\n url: null,\n scope,\n });\n }\n };\n\n void load();\n const interval = setInterval(() => {\n void load();\n }, 2_000);\n\n return () => {\n cancelled = true;\n clearInterval(interval);\n };\n }, [appStateVersion, browserTabId, enabled, scope, scopeKey]);\n\n return useMemo(() => {\n if (!enabled) {\n return options.staticSuggestions\n ? dedupeSuggestions(options.staticSuggestions)\n : undefined;\n }\n\n const ctx = context ?? {\n navigation: null,\n selection: null,\n pendingSelection: null,\n url: null,\n scope,\n };\n const dynamic = config.getSuggestions\n ? config.getSuggestions(ctx)\n : buildDynamicAgentSuggestions(ctx);\n const merged = mergeAgentSuggestions({\n dynamicSuggestions: dynamic,\n staticSuggestions: options.staticSuggestions,\n includeStatic: config.includeStatic,\n max: config.max,\n });\n return merged.length > 0 ? merged : undefined;\n }, [config, context, enabled, scope, scopeKey, options.staticSuggestions]);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dynamic-suggestions.js","sourceRoot":"","sources":["../../src/client/dynamic-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AACvD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA6ClC,MAAM,UAAU,sCAAsC,CACpD,MAAsC;IAEtC,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,GAAG,EAAE,uBAAuB;YAC5B,aAAa,EAAE,IAAI;SACpB,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QA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,OAAO,CAAC,iBAAiB;YAC5C,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,GAAG,EAAE,MAAM,CAAC,GAAG;SAChB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAChD,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAE3E,OAAO;QACL,WAAW;QACX,SAAS,EAAE,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,IAAI,SAAS,CAAC;KACtD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,OAA0C;IAE1C,OAAO,gCAAgC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC;AAC/D,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { agentNativePath } from \"./api-path.js\";\nimport { useChangeVersions } from \"./use-change-version.js\";\nimport type { ChatThreadScope } from \"./use-chat-threads.js\";\n\nconst SAFE_BROWSER_TAB_ID_RE = /^[A-Za-z0-9_-]{1,96}$/;\nconst DEFAULT_MAX_SUGGESTIONS = 4;\n\nexport interface AgentDynamicSuggestionContext {\n navigation: unknown;\n selection: unknown;\n pendingSelection: unknown;\n url: unknown;\n scope?: ChatThreadScope | null;\n}\n\nexport interface AgentDynamicSuggestionsConfig {\n /** Enable/disable dynamic suggestions. Defaults to true. */\n enabled?: boolean;\n /** Maximum number of suggestion chips after merging dynamic + static. */\n max?: number;\n /** Keep the caller-provided static suggestions after dynamic ones. Default true. */\n includeStatic?: boolean;\n /** Optional app-specific deterministic suggestion builder. */\n getSuggestions?: (context: AgentDynamicSuggestionContext) => string[];\n}\n\nexport type AgentDynamicSuggestionsOption =\n | boolean\n | AgentDynamicSuggestionsConfig;\n\nexport interface AgentDynamicSuggestionsResult {\n suggestions: string[] | undefined;\n isLoading: boolean;\n}\n\ninterface UseAgentDynamicSuggestionsOptions {\n staticSuggestions?: readonly string[];\n dynamicSuggestions?: AgentDynamicSuggestionsOption;\n browserTabId?: string;\n scope?: ChatThreadScope | null;\n enabled?: boolean;\n}\n\ninterface NormalizedAgentDynamicSuggestionsConfig {\n enabled: boolean;\n max: number;\n includeStatic: boolean;\n getSuggestions?: (context: AgentDynamicSuggestionContext) => string[];\n}\n\nexport function normalizeAgentDynamicSuggestionsConfig(\n option?: AgentDynamicSuggestionsOption,\n): NormalizedAgentDynamicSuggestionsConfig {\n if (option === false) {\n return {\n enabled: false,\n max: DEFAULT_MAX_SUGGESTIONS,\n includeStatic: true,\n };\n }\n if (option === true || option === undefined) {\n return {\n enabled: true,\n max: DEFAULT_MAX_SUGGESTIONS,\n includeStatic: true,\n };\n }\n return {\n enabled: option.enabled !== false,\n max:\n typeof option.max === \"number\" && Number.isFinite(option.max)\n ? Math.max(1, Math.floor(option.max))\n : DEFAULT_MAX_SUGGESTIONS,\n includeStatic: option.includeStatic !== false,\n ...(option.getSuggestions ? { getSuggestions: option.getSuggestions } : {}),\n };\n}\n\nfunction normalizeBrowserTabId(browserTabId?: string): string | undefined {\n if (typeof browserTabId !== \"string\") return undefined;\n const trimmed = browserTabId.trim();\n return SAFE_BROWSER_TAB_ID_RE.test(trimmed) ? trimmed : undefined;\n}\n\nfunction appStateKeyForBrowserTab(key: string, browserTabId?: string): string {\n return browserTabId ? `${key}:${browserTabId}` : key;\n}\n\nasync function readAppState(key: string): Promise<unknown> {\n const res = await fetch(\n agentNativePath(`/_agent-native/application-state/${key}`),\n );\n if (!res.ok || res.status === 204) return null;\n const text = await res.text();\n if (!text) return null;\n try {\n return JSON.parse(text);\n } catch {\n return null;\n }\n}\n\nasync function readScopedAppState(\n key: string,\n browserTabId?: string,\n): Promise<unknown> {\n if (browserTabId) {\n const scoped = await readAppState(\n appStateKeyForBrowserTab(key, browserTabId),\n );\n if (scoped !== null && scoped !== undefined) return scoped;\n }\n return readAppState(key);\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return null;\n return value as Record<string, unknown>;\n}\n\nfunction stringValue(record: Record<string, unknown> | null, key: string) {\n const value = record?.[key];\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction numberValue(record: Record<string, unknown> | null, key: string) {\n const value = record?.[key];\n return typeof value === \"number\" && Number.isFinite(value)\n ? value\n : undefined;\n}\n\nfunction humanizeIdentifier(value: string): string {\n return value\n .replace(/[_-]+/g, \" \")\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .trim()\n .replace(/\\s+/g, \" \")\n .toLowerCase();\n}\n\nfunction hasSelection(value: unknown): boolean {\n if (typeof value === \"string\") return value.trim().length > 0;\n const record = asRecord(value);\n if (!record) return false;\n if (stringValue(record, \"text\")) return true;\n const items = record.items;\n if (Array.isArray(items) && items.length > 0) return true;\n const ranges = record.ranges;\n if (Array.isArray(ranges) && ranges.length > 0) return true;\n return false;\n}\n\nfunction inferSurface(context: AgentDynamicSuggestionContext): {\n kind: string;\n label: string;\n slideNumber?: number;\n} | null {\n const nav = asRecord(context.navigation);\n const scope = context.scope;\n const view = stringValue(nav, \"view\");\n const scopeType = scope?.type ? humanizeIdentifier(scope.type) : undefined;\n const scopeLabel = scope?.label?.trim();\n const slideNumber = numberValue(nav, \"slideNumber\");\n const slideIndex = numberValue(nav, \"slideIndex\");\n\n if (slideNumber !== undefined || slideIndex !== undefined) {\n return {\n kind: \"slide\",\n label: \"slide\",\n slideNumber: slideNumber ?? (slideIndex ?? 0) + 1,\n };\n }\n if (stringValue(nav, \"threadId\")) return { kind: \"thread\", label: \"thread\" };\n if (stringValue(nav, \"focusedEmailId\") || stringValue(nav, \"emailId\")) {\n return { kind: \"email\", label: \"email\" };\n }\n if (stringValue(nav, \"deckId\") || scopeType === \"deck\") {\n return { kind: \"deck\", label: scopeLabel || \"deck\" };\n }\n if (stringValue(nav, \"dashboardId\") || scopeType === \"dashboard\") {\n return { kind: \"dashboard\", label: scopeLabel || \"dashboard\" };\n }\n if (stringValue(nav, \"chartId\")) return { kind: \"chart\", label: \"chart\" };\n if (stringValue(nav, \"formId\") || scopeType === \"form\") {\n return { kind: \"form\", label: scopeLabel || \"form\" };\n }\n if (stringValue(nav, \"documentId\") || stringValue(nav, \"docId\")) {\n return { kind: \"document\", label: scopeLabel || \"document\" };\n }\n if (stringValue(nav, \"eventId\") || view === \"event\") {\n return { kind: \"event\", label: \"event\" };\n }\n if (\n stringValue(nav, \"meetingId\") ||\n stringValue(nav, \"callId\") ||\n view === \"meeting\" ||\n view === \"call\"\n ) {\n return { kind: \"meeting\", label: \"meeting\" };\n }\n if (\n stringValue(nav, \"clipId\") ||\n stringValue(nav, \"recordingId\") ||\n stringValue(nav, \"videoId\")\n ) {\n return { kind: \"recording\", label: \"recording\" };\n }\n if (scopeType && scopeLabel) return { kind: scopeType, label: scopeLabel };\n if (view) return { kind: view, label: humanizeIdentifier(view) };\n return null;\n}\n\nexport function buildDynamicAgentSuggestions(\n context: AgentDynamicSuggestionContext,\n): string[] {\n const suggestions: string[] = [];\n const selected =\n hasSelection(context.selection) || hasSelection(context.pendingSelection);\n const surface = inferSurface(context);\n\n if (!selected && !surface) {\n return [];\n }\n\n if (selected) {\n suggestions.push(\"Summarize this selection\");\n suggestions.push(\"Rewrite this selection\");\n }\n\n switch (surface?.kind) {\n case \"slide\":\n suggestions.push(\n surface.slideNumber\n ? `Improve slide ${surface.slideNumber}`\n : \"Improve this slide\",\n );\n suggestions.push(\"Make this slide more concise\");\n suggestions.push(\"Add speaker notes for this slide\");\n break;\n case \"deck\":\n suggestions.push(`Summarize this ${surface.label}`);\n suggestions.push(`Improve this ${surface.label}`);\n suggestions.push(\"Create a stronger outline\");\n break;\n case \"thread\":\n case \"email\":\n suggestions.push(\"Summarize this thread\");\n suggestions.push(\"Draft a reply\");\n suggestions.push(\"Find the action items\");\n break;\n case \"dashboard\":\n case \"chart\":\n suggestions.push(`Explain this ${surface.label}`);\n suggestions.push(\"Find anomalies in this data\");\n suggestions.push(\"Suggest a follow-up chart\");\n break;\n case \"form\":\n suggestions.push(`Improve this ${surface.label}`);\n suggestions.push(\"Suggest better questions\");\n suggestions.push(\"Summarize recent responses\");\n break;\n case \"document\":\n suggestions.push(`Summarize this ${surface.label}`);\n suggestions.push(`Improve this ${surface.label}`);\n suggestions.push(\"Find the action items\");\n break;\n case \"event\":\n suggestions.push(\"Prepare me for this event\");\n suggestions.push(\"Draft a follow-up\");\n suggestions.push(\"Find scheduling conflicts\");\n break;\n case \"meeting\":\n case \"recording\":\n suggestions.push(`Summarize this ${surface.label}`);\n suggestions.push(\"Extract action items\");\n suggestions.push(\"Create a shareable summary\");\n break;\n case \"settings\":\n suggestions.push(\"Explain these settings\");\n suggestions.push(\"Help me configure this screen\");\n break;\n case \"list\":\n case \"home\":\n case \"overview\":\n suggestions.push(\"What should I do next here?\");\n suggestions.push(\"Explain what I am looking at\");\n break;\n default:\n if (surface?.label) {\n suggestions.push(`Help me with this ${surface.label}`);\n }\n suggestions.push(\"Explain what I am looking at\");\n suggestions.push(\"Suggest next steps\");\n break;\n }\n\n return dedupeSuggestions(suggestions);\n}\n\nexport function dedupeSuggestions(suggestions: readonly string[]): string[] {\n const seen = new Set<string>();\n const result: string[] = [];\n for (const suggestion of suggestions) {\n const trimmed = suggestion.trim();\n if (!trimmed) continue;\n const key = trimmed.toLowerCase();\n if (seen.has(key)) continue;\n seen.add(key);\n result.push(trimmed);\n }\n return result;\n}\n\nexport function mergeAgentSuggestions(options: {\n dynamicSuggestions: readonly string[];\n staticSuggestions?: readonly string[];\n includeStatic: boolean;\n max: number;\n}): string[] {\n if (options.dynamicSuggestions.length === 0) {\n return options.includeStatic\n ? dedupeSuggestions(options.staticSuggestions ?? [])\n : [];\n }\n\n const merged = options.includeStatic\n ? [...options.dynamicSuggestions, ...(options.staticSuggestions ?? [])]\n : [...options.dynamicSuggestions];\n return dedupeSuggestions(merged).slice(0, options.max);\n}\n\nexport function useAgentDynamicSuggestionsResult(\n options: UseAgentDynamicSuggestionsOptions,\n): AgentDynamicSuggestionsResult {\n const config = useMemo(\n () => normalizeAgentDynamicSuggestionsConfig(options.dynamicSuggestions),\n [options.dynamicSuggestions],\n );\n const browserTabId = useMemo(\n () => normalizeBrowserTabId(options.browserTabId),\n [options.browserTabId],\n );\n const optionScope = options.scope ?? null;\n const scope = useMemo<ChatThreadScope | null>(\n () =>\n optionScope\n ? {\n type: optionScope.type,\n id: optionScope.id,\n ...(optionScope.label ? { label: optionScope.label } : {}),\n }\n : null,\n [optionScope?.type, optionScope?.id, optionScope?.label],\n );\n const scopeKey = scope\n ? `${scope.type}:${scope.id}:${scope.label ?? \"\"}`\n : \"none\";\n const appStateVersion = useChangeVersions([\"app-state\"]);\n const enabled = options.enabled !== false && config.enabled;\n const [context, setContext] = useState<AgentDynamicSuggestionContext | null>(\n null,\n );\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n if (!enabled) {\n setContext(null);\n setIsLoading(false);\n return;\n }\n\n let cancelled = false;\n const load = async (showLoading: boolean) => {\n if (showLoading) setIsLoading(true);\n try {\n const [navigation, selection, pendingSelection, url] =\n await Promise.all([\n readScopedAppState(\"navigation\", browserTabId),\n readScopedAppState(\"selection\", browserTabId),\n readScopedAppState(\"pending-selection-context\", browserTabId),\n readScopedAppState(\"__url__\", browserTabId),\n ]);\n if (cancelled) return;\n setContext({\n navigation,\n selection,\n pendingSelection,\n url,\n scope,\n });\n } catch {\n if (cancelled) return;\n setContext({\n navigation: null,\n selection: null,\n pendingSelection: null,\n url: null,\n scope,\n });\n } finally {\n if (!cancelled && showLoading) setIsLoading(false);\n }\n };\n\n void load(true);\n const interval = setInterval(() => {\n void load(false);\n }, 2_000);\n\n return () => {\n cancelled = true;\n clearInterval(interval);\n };\n }, [appStateVersion, browserTabId, enabled, scope, scopeKey]);\n\n const suggestions = useMemo(() => {\n if (!enabled) {\n return options.staticSuggestions\n ? dedupeSuggestions(options.staticSuggestions)\n : undefined;\n }\n if (context === null) return undefined;\n\n const ctx = context;\n const dynamic = config.getSuggestions\n ? config.getSuggestions(ctx)\n : buildDynamicAgentSuggestions(ctx);\n const merged = mergeAgentSuggestions({\n dynamicSuggestions: dynamic,\n staticSuggestions: options.staticSuggestions,\n includeStatic: config.includeStatic,\n max: config.max,\n });\n return merged.length > 0 ? merged : undefined;\n }, [config, context, enabled, scope, scopeKey, options.staticSuggestions]);\n\n return {\n suggestions,\n isLoading: enabled && (context === null || isLoading),\n };\n}\n\nexport function useAgentDynamicSuggestions(\n options: UseAgentDynamicSuggestionsOptions,\n): string[] | undefined {\n return useAgentDynamicSuggestionsResult(options).suggestions;\n}\n"]}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { useAgentChatContext, type UseAgentChatContextResult, } from "./use-agen
|
|
|
4
4
|
export { useCodeMode, useDevMode } from "./use-dev-mode.js";
|
|
5
5
|
export { agentNativePath, appApiPath, appBasePath, appPath, } from "./api-path.js";
|
|
6
6
|
export { deleteClientAppState, readClientAppState, setClientAppState, writeClientAppState, type ClientAppStateReadOptions, type ClientAppStateWriteOptions, } from "./application-state.js";
|
|
7
|
+
export { useAgentRouteState, useSemanticNavigationState, type AgentRouteLocation, type SemanticNavigationCommandEnvelope, type UseAgentRouteStateOptions, type UseAgentRouteStateResult, type UseSemanticNavigationStateOptions, type UseSemanticNavigationStateResult, } from "./route-state.js";
|
|
7
8
|
export { ensureEmbedAuthFetchInterceptor, getEmbedAuthToken, isEmbedAuthActive, isEmbedMcpChatBridgeActive, } from "./embed-auth.js";
|
|
8
9
|
export { codeAgentTranscriptEventsToContent, createCodeAgentChatAdapter, type CodeAgentChatController, type CodeAgentChatControlResult, type CodeAgentChatFollowUpMode, type CodeAgentChatTranscriptEvent, type CreateCodeAgentChatAdapterOptions, } from "./code-agent-chat-adapter.js";
|
|
9
10
|
export { buildRepositoryFromCodeAgentTranscript, type BuildRepositoryFromCodeAgentTranscriptOptions, type CodeAgentThreadTranscriptEvent, } from "../agent/thread-data-builder.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,EACpC,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,GAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,GACvC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,EACtC,KAAK,6CAA6C,EAClD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,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,EACpC,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,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,EACnB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { useAgentChatContext, } from "./use-agent-chat-context.js";
|
|
|
8
8
|
export { useCodeMode, useDevMode } from "./use-dev-mode.js";
|
|
9
9
|
export { agentNativePath, appApiPath, appBasePath, appPath, } from "./api-path.js";
|
|
10
10
|
export { deleteClientAppState, readClientAppState, setClientAppState, writeClientAppState, } from "./application-state.js";
|
|
11
|
+
export { useAgentRouteState, useSemanticNavigationState, } from "./route-state.js";
|
|
11
12
|
export { ensureEmbedAuthFetchInterceptor, getEmbedAuthToken, isEmbedAuthActive, isEmbedMcpChatBridgeActive, } from "./embed-auth.js";
|
|
12
13
|
export { codeAgentTranscriptEventsToContent, createCodeAgentChatAdapter, } from "./code-agent-chat-adapter.js";
|
|
13
14
|
export { buildRepositoryFromCodeAgentTranscript, } from "../agent/thread-data-builder.js";
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,yBAAyB,EAAE,CAAC;AAC5B,6BAA6B,EAAE,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,EACpC,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,GAQd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,mBAAmB,GAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GAGpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC,0BAA0B,GAM3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,G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iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAA4B,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,GAE5B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,yBAAyB;AACzB,OAAO,EACL,WAAW,GAEZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nimport { stripAuthRedirectParamFromUrl } from \"./auth-redirect-url.js\";\n\ninstallRouteChunkRecovery();\nstripAuthRedirectParamFromUrl();\n\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n listAgentChatContext,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n sendToAgentChat,\n setAgentChatContextItem,\n setContextToAgentChat,\n generateTabId,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n} from \"./agent-chat.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport {\n useAgentChatContext,\n type UseAgentChatContextResult,\n} from \"./use-agent-chat-context.js\";\nexport { useCodeMode, useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n deleteClientAppState,\n readClientAppState,\n setClientAppState,\n writeClientAppState,\n type ClientAppStateReadOptions,\n type ClientAppStateWriteOptions,\n} from \"./application-state.js\";\nexport {\n ensureEmbedAuthFetchInterceptor,\n getEmbedAuthToken,\n isEmbedAuthActive,\n isEmbedMcpChatBridgeActive,\n} from \"./embed-auth.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"./mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport { useReconciledState } from \"./use-external-value.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getFramePostMessageTargetOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeRouteWarmup,\n type AgentNativeRouteWarmupProps,\n} from \"./route-warmup.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport { createAgentChatAdapter } from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n} from \"./composer/index.js\";\nexport type { TiptapComposerHandle } from \"./composer/TiptapComposer.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ChatThreadData,\n type UseChatThreadsOptions,\n} from \"./use-chat-threads.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n SIDEBAR_STATE_CHANGE_EVENT,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport { SettingsPanel, type SettingsPanelProps } from \"./settings/index.js\";\nexport { useBuilderStatus } from \"./settings/useBuilderStatus.js\";\nexport {\n openBuilderConnectPopup,\n useBuilderConnectFlow,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type OpenBuilderConnectPopupOptions,\n} from \"./settings/useBuilderStatus.js\";\n// Deprecated — use AgentSidebar + AgentToggleButton instead\nexport {\n ProductionAgentPanel,\n type ProductionAgentPanelProps,\n} from \"./ProductionAgentPanel.js\";\nexport {\n useProductionAgent,\n type ProductionAgentMessage,\n type UseProductionAgentOptions,\n type UseProductionAgentResult,\n} from \"./useProductionAgent.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport {\n StarfieldBackground,\n type StarfieldBackgroundProps,\n} from \"./StarfieldBackground.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n setSentryUser,\n captureError,\n captureClientException,\n type ClientCaptureContext,\n} from \"./analytics.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n useCommandMenuShortcut,\n openAgentSidebar,\n submitToAgent,\n type CommandMenuProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n callAction,\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n type ClientActionCallOptions,\n type ClientActionMethod,\n} from \"./use-action.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,yBAAyB,EAAE,CAAC;AAC5B,6BAA6B,EAAE,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,E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,GAElB,MAAM,mCAAmC,CAAC;AAC3C,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nimport { stripAuthRedirectParamFromUrl } from \"./auth-redirect-url.js\";\n\ninstallRouteChunkRecovery();\nstripAuthRedirectParamFromUrl();\n\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n listAgentChatContext,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n sendToAgentChat,\n setAgentChatContextItem,\n setContextToAgentChat,\n generateTabId,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n} from \"./agent-chat.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport {\n useAgentChatContext,\n type UseAgentChatContextResult,\n} from \"./use-agent-chat-context.js\";\nexport { useCodeMode, useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n deleteClientAppState,\n readClientAppState,\n setClientAppState,\n writeClientAppState,\n type ClientAppStateReadOptions,\n type ClientAppStateWriteOptions,\n} from \"./application-state.js\";\nexport {\n useAgentRouteState,\n useSemanticNavigationState,\n type AgentRouteLocation,\n type SemanticNavigationCommandEnvelope,\n type UseAgentRouteStateOptions,\n type UseAgentRouteStateResult,\n type UseSemanticNavigationStateOptions,\n type UseSemanticNavigationStateResult,\n} from \"./route-state.js\";\nexport {\n ensureEmbedAuthFetchInterceptor,\n getEmbedAuthToken,\n isEmbedAuthActive,\n isEmbedMcpChatBridgeActive,\n} from \"./embed-auth.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"./mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport { useReconciledState } from \"./use-external-value.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getFramePostMessageTargetOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeRouteWarmup,\n type AgentNativeRouteWarmupProps,\n} from \"./route-warmup.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport { createAgentChatAdapter } from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n} from \"./composer/index.js\";\nexport type { TiptapComposerHandle } from \"./composer/TiptapComposer.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ChatThreadData,\n type UseChatThreadsOptions,\n} from \"./use-chat-threads.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n SIDEBAR_STATE_CHANGE_EVENT,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport { SettingsPanel, type SettingsPanelProps } from \"./settings/index.js\";\nexport { useBuilderStatus } from \"./settings/useBuilderStatus.js\";\nexport {\n openBuilderConnectPopup,\n useBuilderConnectFlow,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type OpenBuilderConnectPopupOptions,\n} from \"./settings/useBuilderStatus.js\";\n// Deprecated — use AgentSidebar + AgentToggleButton instead\nexport {\n ProductionAgentPanel,\n type ProductionAgentPanelProps,\n} from \"./ProductionAgentPanel.js\";\nexport {\n useProductionAgent,\n type ProductionAgentMessage,\n type UseProductionAgentOptions,\n type UseProductionAgentResult,\n} from \"./useProductionAgent.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport {\n StarfieldBackground,\n type StarfieldBackgroundProps,\n} from \"./StarfieldBackground.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n setSentryUser,\n captureError,\n captureClientException,\n type ClientCaptureContext,\n} from \"./analytics.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n useCommandMenuShortcut,\n openAgentSidebar,\n submitToAgent,\n type CommandMenuProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n callAction,\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n type ClientActionCallOptions,\n type ClientActionMethod,\n} from \"./use-action.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n"]}
|
|
@@ -140,7 +140,7 @@ Follow the create-skill pattern to build this. Before writing:
|
|
|
140
140
|
|
|
141
141
|
1. **Determine the skill name** — derive a hyphen-case name from the description (e.g. "code review" → "code-review")
|
|
142
142
|
2. **Determine the skill type** — Pattern (architectural rule), Workflow (step-by-step), or Generator (scaffolding)
|
|
143
|
-
3. **Write the skill** as a ${scope} resource at path "skills/<name>/SKILL.md" using
|
|
143
|
+
3. **Write the skill** as a ${scope} resource at path "skills/<name>/SKILL.md" using the \`resources\` tool with \`action: "write"\`
|
|
144
144
|
|
|
145
145
|
The skill file MUST have YAML frontmatter with name and description (under 40 words), then markdown with:
|
|
146
146
|
- Clear rule/purpose statement
|
|
@@ -261,7 +261,7 @@ The job will run automatically on the schedule. Make the instructions specific
|
|
|
261
261
|
newTab: true,
|
|
262
262
|
context: `The user wants a reusable custom sub-agent profile for the workspace. Their description: "${trimmed}"
|
|
263
263
|
|
|
264
|
-
Create it as a ${scope} resource under "agents/<name>.md" using
|
|
264
|
+
Create it as a ${scope} resource under "agents/<name>.md" using the \`resources\` tool with \`action: "write"\`.
|
|
265
265
|
|
|
266
266
|
Requirements:
|
|
267
267
|
1. Derive a hyphen-case file name from the intent
|