@ai-matrx/chat 0.2.4 → 0.2.7
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/CHANGELOG.md +30 -0
- package/dist/agents/addressing/agentAddress.js +1 -1
- package/dist/agents/components/context-items/bodies/ProcessedDocumentTitle.js +3 -2
- package/dist/agents/components/context-items/bodies/WebpageBody.js +6 -1
- package/dist/agents/components/debug/SandboxFileViewer.js +6 -1
- package/dist/agents/components/debug/StreamDebugPanel.js +6 -1
- package/dist/agents/components/inputs/input-components/MediaVariableInput.js +1 -1
- package/dist/agents/components/inputs/input-components/PicklistVariableInput.js +2 -2
- package/dist/agents/components/inputs/resources/attached-documents.js +3 -2
- package/dist/agents/components/inputs/resources/usePasteImageResource.js +2 -2
- package/dist/agents/components/messages-display/TranscriptIntegrityCopyButton.js +6 -2
- package/dist/agents/components/observational-memory/components/MemoryStateInspector.d.ts +0 -12
- package/dist/agents/components/observational-memory/components/MemoryStateInspector.js +10 -2
- package/dist/agents/components/run-controls/AgentExecutionTestModal.js +6 -1
- package/dist/agents/components/shared/AgentDuplicateOutcomeDialog.d.ts +26 -2
- package/dist/agents/components/shared/AgentDuplicateOutcomeDialog.js +50 -4
- package/dist/agents/components/shared/AgentOptionsMenu.js +11 -61
- package/dist/agents/components/shared/StreamProfilerOverlay.js +6 -1
- package/dist/agents/components/working-document/workingDocumentSurface.d.ts +1 -1
- package/dist/agents/hooks/useAgentDuplicateFlow.d.ts +13 -3
- package/dist/agents/hooks/useAgentDuplicateFlow.js +81 -24
- package/dist/agents/hooks/useWidgetHandle.js +1 -1
- package/dist/agents/prompt-preview/PromptPreviewContent.js +6 -1
- package/dist/agents/redux/agent-definition/cache-bust-middleware.js +1 -1
- package/dist/agents/redux/agent-definition/parse-messages-variables.js +6 -0
- package/dist/agents/redux/agent-shortcuts/thunks.js +1 -1
- package/dist/agents/redux/execution-system/instance-resources/resource-source.js +1 -2
- package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +1 -1
- package/dist/agents/redux/execution-system/thunks/launch-conversation.thunk.js +1 -1
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.d.ts +8 -3
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +36 -3
- package/dist/agents/redux/execution-system/utils/assert-conversation-id.js +1 -1
- package/dist/agents/redux/execution-system/utils/content-prefilter.js +2 -2
- package/dist/agents/runtime/realtime/launchRealtimeSession.thunk.js +1 -1
- package/dist/agents/surface-catalog-profile.d.ts +2 -2
- package/dist/agents/types/agent-definition.types.d.ts +8 -6
- package/dist/agents/utils/variable-customcomponent.d.ts +2 -2
- package/dist/agents/utils/variable-customcomponent.js +4 -4
- package/dist/cx-chat/components/messages/AssistantMessage.js +1 -1
- package/dist/cx-chat/components/user-input/ConversationInput.js +1 -1
- package/dist/cx-conversation/AssistantMessage.js +1 -1
- package/dist/cx-conversation/ConversationInput.js +1 -1
- package/dist/host/builder-door.d.ts +13 -2
- package/dist/host/db-types.d.ts +150 -2
- package/dist/host/defaults/diagnostics.js +1 -1
- package/dist/host/ui-slots.d.ts +2 -22
- package/dist/host/ui-slots.js +3 -29
- package/dist/host/window-openers.d.ts +3 -3
- package/dist/host/window-openers.js +4 -4
- package/dist/store/create-chat-store.d.ts +2 -0
- package/dist/store/create-chat-store.js +15 -3
- package/dist/surfaces/runtime/loaded-value-check.js +1 -1
- package/dist/surfaces/runtime/surface-writeback.js +1 -1
- package/dist/surfaces/utils/route-to-surface.js +1 -1
- package/dist/surfaces/utils/surface-display.js +1 -1
- package/dist/tool-call-visualization/effects/toolStateEffects.d.ts +1 -1
- package/dist/tool-call-visualization/registry/registry.js +3 -7
- package/dist/tool-call-visualization/result-fields/shape.js +1 -1
- package/dist/ui/file-source.d.ts +3 -17
- package/dist/voice-agent/components/VoiceDebugPanel.js +6 -1
- package/dist/voice-agent/hooks/useRealtimeAgentConfig.js +1 -1
- package/dist/voice-agent/hooks/useXaiVoiceSession.js +2 -2
- package/dist/voice-agent/transport/xaiClient.js +1 -1
- package/dist/window-panels/windows/agents/AgentMemoryWindow.js +7 -5
- package/package.json +3 -3
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
CheckCircle,
|
|
5
5
|
FileSearch,
|
|
6
6
|
ListChecks,
|
|
7
|
-
List,
|
|
8
7
|
SquareCheckBig,
|
|
9
8
|
ListTodo,
|
|
10
9
|
FileText,
|
|
@@ -1061,14 +1060,13 @@ const APP_FEATURE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1061
1060
|
"seo_check_meta_descriptions",
|
|
1062
1061
|
"seo_get_keyword_data",
|
|
1063
1062
|
"topical_map",
|
|
1064
|
-
"
|
|
1063
|
+
"pick_list",
|
|
1065
1064
|
"task",
|
|
1066
1065
|
"tasks",
|
|
1067
1066
|
"user_todos",
|
|
1068
1067
|
"document",
|
|
1069
1068
|
"dataset",
|
|
1070
1069
|
"usertable_create",
|
|
1071
|
-
"get_user_lists",
|
|
1072
1070
|
"knowledge_search",
|
|
1073
1071
|
"document_search",
|
|
1074
1072
|
"knowledge_browse",
|
|
@@ -1165,14 +1163,13 @@ const RESULT_IS_PURPOSE_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1165
1163
|
// the inventory / passage / store / entity map IS the answer
|
|
1166
1164
|
"document_content",
|
|
1167
1165
|
// the fetched pages/text ARE the answer
|
|
1168
|
-
"get_user_lists",
|
|
1169
1166
|
"seo",
|
|
1170
1167
|
// the analyzed SERP previews / keyword table ARE the deliverable
|
|
1171
1168
|
"seo_check_meta_tags_batch",
|
|
1172
1169
|
"seo_check_meta_titles",
|
|
1173
1170
|
"seo_check_meta_descriptions",
|
|
1174
1171
|
"seo_get_keyword_data",
|
|
1175
|
-
"
|
|
1172
|
+
"pick_list",
|
|
1176
1173
|
// the created/loaded list is the deliverable
|
|
1177
1174
|
"document",
|
|
1178
1175
|
"dataset",
|
|
@@ -1198,8 +1195,7 @@ function getToolDisplayMode(toolName, entry) {
|
|
|
1198
1195
|
}
|
|
1199
1196
|
const TOOL_GLYPHS = {
|
|
1200
1197
|
// entity tools
|
|
1201
|
-
|
|
1202
|
-
get_user_lists: { icon: List, accent: "violet" },
|
|
1198
|
+
pick_list: { icon: ListChecks, accent: "violet" },
|
|
1203
1199
|
task: { icon: SquareCheckBig, accent: "blue" },
|
|
1204
1200
|
tasks: { icon: ListTodo, accent: "blue" },
|
|
1205
1201
|
user_todos: { icon: ListTodo, accent: "blue" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { recognizeOurFileUrl } from "@ai-matrx/media/files/engine";
|
|
1
2
|
import { fileNameFromUrl } from "@ai-matrx/data/files";
|
|
2
|
-
import { recognizeOurFileUrl } from "../../host/ui-slots.js";
|
|
3
3
|
import { findCodeRanges } from "@ai-matrx/content-ir/source";
|
|
4
4
|
import { findTableStart } from "@ai-matrx/content-ir/source";
|
|
5
5
|
import { isUuidShape } from "@ai-matrx/kit/uuid";
|
package/dist/ui/file-source.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* needs (`{ kind: "file_id" }`, `{ kind: "external_url" }`) and reads `meta.category`.
|
|
2
|
+
* A file source and a normalized file, as chat names them — the files engine's own types
|
|
3
|
+
* (@ai-matrx/media/files/engine, P16f). One definition; never a structural copy here.
|
|
5
4
|
*/
|
|
6
|
-
export
|
|
7
|
-
kind: string;
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}
|
|
10
|
-
export interface NormalizedFile {
|
|
11
|
-
fileId?: string;
|
|
12
|
-
url?: string;
|
|
13
|
-
meta: {
|
|
14
|
-
category?: string;
|
|
15
|
-
mime?: string;
|
|
16
|
-
[key: string]: unknown;
|
|
17
|
-
};
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
5
|
+
export type { FileSource, NormalizedFile } from "@ai-matrx/media/files/engine";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useClipboard } from "@ai-matrx/kit/clipboard";
|
|
4
|
+
import { toast as copyToast } from "../../host/notify.js";
|
|
3
5
|
import { Badge, Button, Tile } from "@ai-matrx/design-system/controls";
|
|
4
6
|
import { useEffect, useReducer, useState } from "react";
|
|
5
7
|
import { Bug, Check, ChevronDown, ChevronUp, Copy, Trash2 } from "lucide-react";
|
|
@@ -29,6 +31,9 @@ function VoiceDebugPanel({
|
|
|
29
31
|
instanceId,
|
|
30
32
|
defaultOpen = false
|
|
31
33
|
}) {
|
|
34
|
+
const { copyText } = useClipboard({
|
|
35
|
+
notify: (message, kind) => kind === "error" ? copyToast.error(message) : copyToast.success(message)
|
|
36
|
+
});
|
|
32
37
|
const [open, setOpen] = useState(defaultOpen);
|
|
33
38
|
const [copied, setCopied] = useState(false);
|
|
34
39
|
const [, force] = useReducer((n) => n + 1, 0);
|
|
@@ -70,7 +75,7 @@ function VoiceDebugPanel({
|
|
|
70
75
|
)
|
|
71
76
|
];
|
|
72
77
|
try {
|
|
73
|
-
await
|
|
78
|
+
await copyText(lines.join("\n"));
|
|
74
79
|
setCopied(true);
|
|
75
80
|
setTimeout(() => setCopied(false), 1500);
|
|
76
81
|
toast.success("Voice debug copied");
|
|
@@ -48,7 +48,7 @@ function useRealtimeAgentConfig(opts) {
|
|
|
48
48
|
setState({ ready: true, error: null });
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
if (
|
|
51
|
+
if (process.env.NODE_ENV !== "production") {
|
|
52
52
|
console.warn(
|
|
53
53
|
`[useRealtimeAgentConfig] tool resolve failed for agent ${agentId}; keeping seeded tools. ${result.error}`
|
|
54
54
|
);
|
|
@@ -557,7 +557,7 @@ function useXaiVoiceSession(opts) {
|
|
|
557
557
|
break;
|
|
558
558
|
}
|
|
559
559
|
case "rate_limits.updated": {
|
|
560
|
-
if (
|
|
560
|
+
if (process.env.NODE_ENV !== "production") {
|
|
561
561
|
console.debug(
|
|
562
562
|
"[useXaiVoiceSession] rate_limits.updated",
|
|
563
563
|
event.rate_limits
|
|
@@ -575,7 +575,7 @@ function useXaiVoiceSession(opts) {
|
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
577
|
case "unknown": {
|
|
578
|
-
if (
|
|
578
|
+
if (process.env.NODE_ENV !== "production") {
|
|
579
579
|
console.warn(
|
|
580
580
|
"[useXaiVoiceSession] Unknown server event:",
|
|
581
581
|
event.raw
|
|
@@ -111,7 +111,7 @@ function createXaiClient() {
|
|
|
111
111
|
providerCode: event.code,
|
|
112
112
|
providerMessage: event.message
|
|
113
113
|
});
|
|
114
|
-
} else if (event.type === "unknown" &&
|
|
114
|
+
} else if (event.type === "unknown" && process.env.NODE_ENV !== "production") {
|
|
115
115
|
console.warn("[xaiClient] Unknown server event:", event.raw);
|
|
116
116
|
}
|
|
117
117
|
emitEvent(event);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useClipboard } from "@ai-matrx/kit/clipboard";
|
|
4
|
+
import { toast as copyToast } from "../../../host/notify.js";
|
|
3
5
|
import { WindowPanel } from "../../../host/ui-slots.js";
|
|
4
6
|
import { Brain, Copy, RefreshCw } from "lucide-react";
|
|
5
7
|
import { useAgentMemories } from "../../../agents/components/memory/hooks/useAgentMemories.js";
|
|
@@ -8,7 +10,6 @@ import { AgentMemoryBody } from "../../../agents/components/memory/components/Ag
|
|
|
8
10
|
import { AgentMemoryFooter } from "../../../agents/components/memory/components/AgentMemoryFooter.js";
|
|
9
11
|
import { NonEditableContextMenu } from "../../../host/ui-slots.js";
|
|
10
12
|
import { CONTEXT_MENU_ENTITY_KEY } from "../../../context-menu/types.js";
|
|
11
|
-
import { toast } from "../../../host/notify.js";
|
|
12
13
|
import { displayTitleForMemory } from "../../../agents/components/memory/types.js";
|
|
13
14
|
import { CHAT_WINDOWS } from "../../../host/windows.js";
|
|
14
15
|
const WINDOW_ID = "agent-memory-window";
|
|
@@ -17,6 +18,9 @@ function AgentMemoryWindow({
|
|
|
17
18
|
isOpen,
|
|
18
19
|
onClose
|
|
19
20
|
}) {
|
|
21
|
+
const { copyText } = useClipboard({
|
|
22
|
+
notify: (message, kind) => kind === "error" ? copyToast.error(message) : copyToast.success(message)
|
|
23
|
+
});
|
|
20
24
|
const state = useAgentMemories();
|
|
21
25
|
if (!isOpen) return null;
|
|
22
26
|
const selected = state.selectedMemory;
|
|
@@ -33,8 +37,7 @@ function AgentMemoryWindow({
|
|
|
33
37
|
disabled: !selected,
|
|
34
38
|
onSelect: () => {
|
|
35
39
|
if (!selected) return;
|
|
36
|
-
void
|
|
37
|
-
toast.success("Memory ID copied");
|
|
40
|
+
void copyText(selected.id, "Memory ID copied");
|
|
38
41
|
}
|
|
39
42
|
},
|
|
40
43
|
{
|
|
@@ -45,8 +48,7 @@ function AgentMemoryWindow({
|
|
|
45
48
|
disabled: !selected,
|
|
46
49
|
onSelect: () => {
|
|
47
50
|
if (!selected) return;
|
|
48
|
-
void
|
|
49
|
-
toast.success("Memory content copied");
|
|
51
|
+
void copyText(selected.content, "Memory content copied");
|
|
50
52
|
}
|
|
51
53
|
},
|
|
52
54
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/chat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "THE one AI Matrx person-to-agent chat system: the full chat (running agents, conversations, tool calls, streaming, context, surfaces, voice) as per-module subpaths @ai-matrx/chat/<domain>/<module> over a host contract (/host, /host/react) whose only required value is a db; plus the kernel compatibility entries (., /external-store, /matrx, /react, /tools, styles.css, tokens.css) until P28.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -209,15 +209,15 @@
|
|
|
209
209
|
"@ai-matrx/content-ir": "latest",
|
|
210
210
|
"@ai-matrx/content-ir-react": "latest",
|
|
211
211
|
"@ai-matrx/data": "latest",
|
|
212
|
+
"@ai-matrx/diff": "latest",
|
|
212
213
|
"@ai-matrx/design-system": "latest",
|
|
213
214
|
"@ai-matrx/icons": "latest",
|
|
214
215
|
"@ai-matrx/kit": "latest",
|
|
215
216
|
"@ai-matrx/media": "latest",
|
|
216
217
|
"@ai-matrx/print": "latest",
|
|
217
218
|
"@ai-matrx/realtime": "latest",
|
|
218
|
-
"@ai-matrx/diff": "latest",
|
|
219
|
-
"@ai-matrx/records-ui": "latest",
|
|
220
219
|
"@ai-matrx/records": "latest",
|
|
220
|
+
"@ai-matrx/records-ui": "latest",
|
|
221
221
|
"@ai-matrx/tap-target": "latest"
|
|
222
222
|
},
|
|
223
223
|
"devDependencies": {
|