@ai-matrx/chat 0.2.5 → 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 +19 -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/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/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/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 +1 -1
- 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 +4 -4
- package/dist/host/defaults/diagnostics.js +1 -1
- package/dist/host/ui-slots.d.ts +0 -20
- package/dist/host/ui-slots.js +0 -26
- 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/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
package/dist/host/ui-slots.js
CHANGED
|
@@ -93,7 +93,6 @@ const STAND_INS = {
|
|
|
93
93
|
fetchArtifactsForMessageThunk: noopThunk,
|
|
94
94
|
updateArtifactThunk: failingThunk("updateArtifactThunk"),
|
|
95
95
|
registerArtifactThunk: failingThunk("registerArtifactThunk"),
|
|
96
|
-
renameFile: failingThunk("renameFile"),
|
|
97
96
|
refreshNoteContent: failingThunk("refreshNoteContent"),
|
|
98
97
|
saveNoteField: failingThunk("saveNoteField"),
|
|
99
98
|
fetchNotesList: noopThunk,
|
|
@@ -314,23 +313,10 @@ const SearchGroup = slotComponent(
|
|
|
314
313
|
({ children, className }) => createElement("div", { className: `flex items-center ${className ?? ""}`, "data-chat-slot-fallback": "SearchGroup" }, children ?? null)
|
|
315
314
|
);
|
|
316
315
|
const SearchGroupTrigger = slotComponent("SearchGroupTrigger");
|
|
317
|
-
const noUploadHere = () => Promise.reject(new Error("This host has no file upload (registerChatUi useFileUpload)"));
|
|
318
|
-
const useFileUpload = slotFn("useFileUpload", () => ({
|
|
319
|
-
upload: noUploadHere,
|
|
320
|
-
uploadMany: noUploadHere,
|
|
321
|
-
uploading: false,
|
|
322
|
-
progress: null,
|
|
323
|
-
result: null,
|
|
324
|
-
error: null,
|
|
325
|
-
reset: () => void 0
|
|
326
|
-
}));
|
|
327
|
-
const useFile = slotFn("useFile", () => ({ file: null }));
|
|
328
316
|
const useFileDocument = slotFn("useFileDocument");
|
|
329
317
|
const useFileResourceFamily = slotFn("useFileResourceFamily");
|
|
330
318
|
const useFileActions = slotFn("useFileActions");
|
|
331
319
|
const useRecordAndTranscribe = slotFn("useRecordAndTranscribe");
|
|
332
|
-
const resolveFile = slotFn("resolveFile");
|
|
333
|
-
const renameFile = slotFn("renameFile");
|
|
334
320
|
const requestScribeAudioSeek = slotFn("requestScribeAudioSeek", () => void 0);
|
|
335
321
|
const resolvePdfSurfaceIds = slotFn("resolvePdfSurfaceIds");
|
|
336
322
|
const readListRpc = slotFn("readListRpc");
|
|
@@ -432,13 +418,11 @@ const dispatchWarRoomTool = slotFn("dispatchWarRoomTool");
|
|
|
432
418
|
const dispatchWarRoomMasterTool = slotFn("dispatchWarRoomMasterTool");
|
|
433
419
|
const resolveGmailSendConnection = slotFn("resolveGmailSendConnection");
|
|
434
420
|
const voiceDisplayName = slotFn("voiceDisplayName", (_set, id) => id);
|
|
435
|
-
const recognizeOurFileUrl = slotFn("recognizeOurFileUrl", () => null);
|
|
436
421
|
const canvasGetVersionHistory = slotFn("canvasGetVersionHistory");
|
|
437
422
|
const canvasGetById = slotFn("canvasGetById");
|
|
438
423
|
const createSandboxFilesystemAdapter = slotFn("createSandboxFilesystemAdapter");
|
|
439
424
|
const notesGetById = slotFn("notesGetById");
|
|
440
425
|
const isLiveConversationVoice = slotFn("isLiveConversationVoice", () => false);
|
|
441
|
-
const ourFileUrlMarkers = slotFn("ourFileUrlMarkers", () => []);
|
|
442
426
|
const createHtmlPage = slotFn("createHtmlPage");
|
|
443
427
|
const convertMarkdownToHtml = slotFn("convertMarkdownToHtml");
|
|
444
428
|
const sklActions = new Proxy({}, { get: (_t, prop) => (...args) => {
|
|
@@ -460,8 +444,6 @@ const readOf = slotFn("readOf");
|
|
|
460
444
|
const pushAppHref = slotFn("pushAppHref");
|
|
461
445
|
const replaceAppHref = slotFn("replaceAppHref");
|
|
462
446
|
const announceComingSoon = slotFn("announceComingSoon");
|
|
463
|
-
const normalize = slotFn("normalize");
|
|
464
|
-
const toMediaRef = slotFn("toMediaRef");
|
|
465
447
|
const peekSystemOrgId = slotFn("peekSystemOrgId");
|
|
466
448
|
const toGlobalOwnershipRecord = slotFn("toGlobalOwnershipRecord");
|
|
467
449
|
const fromGlobalOwnershipRecord = slotFn("fromGlobalOwnershipRecord");
|
|
@@ -702,12 +684,10 @@ export {
|
|
|
702
684
|
makeSelectUsageGroups,
|
|
703
685
|
markDriftAlertViewed,
|
|
704
686
|
materializeMessageArtifacts,
|
|
705
|
-
normalize,
|
|
706
687
|
noteBrowserActivity,
|
|
707
688
|
notesCreate,
|
|
708
689
|
notesGetById,
|
|
709
690
|
notifyPrintOutcome,
|
|
710
|
-
ourFileUrlMarkers,
|
|
711
691
|
peekMandateCatalogueEntry,
|
|
712
692
|
peekSystemOrgId,
|
|
713
693
|
precedingQuestion,
|
|
@@ -717,19 +697,16 @@ export {
|
|
|
717
697
|
readOf,
|
|
718
698
|
readProjectScopeOrganizationId,
|
|
719
699
|
receivedFsChange,
|
|
720
|
-
recognizeOurFileUrl,
|
|
721
700
|
reconcileMessagesArtifacts,
|
|
722
701
|
refreshNoteContent,
|
|
723
702
|
registerArtifactThunk,
|
|
724
703
|
registerChatUi,
|
|
725
|
-
renameFile,
|
|
726
704
|
replaceAppHref,
|
|
727
705
|
reportCanvasOpenDrop,
|
|
728
706
|
requestScribeAudioSeek,
|
|
729
707
|
requireAuthenticatedSupabaseSession,
|
|
730
708
|
resetChatUiForTests,
|
|
731
709
|
resolveEntityToken,
|
|
732
|
-
resolveFile,
|
|
733
710
|
resolveGmailSendConnection,
|
|
734
711
|
resolvePdfSurfaceIds,
|
|
735
712
|
resolvePreferredChatModel,
|
|
@@ -753,7 +730,6 @@ export {
|
|
|
753
730
|
studioDocumentContentChanged,
|
|
754
731
|
summarizeContextCell,
|
|
755
732
|
toGlobalOwnershipRecord,
|
|
756
|
-
toMediaRef,
|
|
757
733
|
toastDoor,
|
|
758
734
|
traceWarRoomRenderPath,
|
|
759
735
|
updateArtifactThunk,
|
|
@@ -770,11 +746,9 @@ export {
|
|
|
770
746
|
useConversationAttachments,
|
|
771
747
|
useCostDisplay,
|
|
772
748
|
useEntityTitles,
|
|
773
|
-
useFile,
|
|
774
749
|
useFileActions,
|
|
775
750
|
useFileDocument,
|
|
776
751
|
useFileResourceFamily,
|
|
777
|
-
useFileUpload,
|
|
778
752
|
useGitHubConnection,
|
|
779
753
|
useHeldWriteTableName,
|
|
780
754
|
useHtmlPreviewState,
|
|
@@ -43,6 +43,7 @@ export declare function createChatStore(preloadedState?: Partial<ChatState>): im
|
|
|
43
43
|
conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
|
|
44
44
|
modelRegistry: import("../agents/model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
45
45
|
chatHost: import("./chat-host.slice.js").ChatHostState;
|
|
46
|
+
cloudFiles: import("@ai-matrx/media/files/engine").CloudFilesState;
|
|
46
47
|
}, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
47
48
|
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
48
49
|
voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
|
|
@@ -88,6 +89,7 @@ export declare function createChatStore(preloadedState?: Partial<ChatState>): im
|
|
|
88
89
|
conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
|
|
89
90
|
modelRegistry: import("../agents/model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
90
91
|
chatHost: import("./chat-host.slice.js").ChatHostState;
|
|
92
|
+
cloudFiles: import("@ai-matrx/media/files/engine").CloudFilesState;
|
|
91
93
|
}, undefined, import("redux").UnknownAction>;
|
|
92
94
|
}>, import("redux").StoreEnhancer]>>;
|
|
93
95
|
export type ChatStore = ReturnType<typeof createChatStore>;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { combineReducers, configureStore } from "@reduxjs/toolkit";
|
|
2
2
|
import createSagaMiddleware from "redux-saga";
|
|
3
3
|
import { fork } from "redux-saga/effects";
|
|
4
|
+
import {
|
|
5
|
+
cloudFilesMutationToastMiddleware,
|
|
6
|
+
cloudFilesRealtimeMiddleware,
|
|
7
|
+
cloudFilesReducer
|
|
8
|
+
} from "@ai-matrx/media/files/engine";
|
|
4
9
|
import { chatReducers } from "./slices.js";
|
|
5
10
|
import { chatMiddlewares } from "./middlewares.js";
|
|
6
11
|
import { chatSagas } from "./sagas.js";
|
|
7
12
|
function createChatStore(preloadedState) {
|
|
8
13
|
const sagaMiddleware = createSagaMiddleware();
|
|
9
14
|
const store = configureStore({
|
|
10
|
-
|
|
15
|
+
// Files are part of chat (P16f): the files engine's slice and its two middlewares come
|
|
16
|
+
// straight from @ai-matrx/media. A host that brings its own store mounts them itself.
|
|
17
|
+
reducer: combineReducers({ ...chatReducers, cloudFiles: cloudFilesReducer }),
|
|
11
18
|
preloadedState,
|
|
12
19
|
// The chat middlewares are still typed against the host RootState (§2.3 — host keys
|
|
13
20
|
// they read); widened here until those reads move onto `chatHost` (P7–P9).
|
|
@@ -15,8 +22,13 @@ function createChatStore(preloadedState) {
|
|
|
15
22
|
serializableCheck: false,
|
|
16
23
|
immutableCheck: false,
|
|
17
24
|
actionCreatorCheck: false
|
|
18
|
-
}).concat(
|
|
19
|
-
|
|
25
|
+
}).concat(
|
|
26
|
+
sagaMiddleware,
|
|
27
|
+
...chatMiddlewares(),
|
|
28
|
+
cloudFilesRealtimeMiddleware,
|
|
29
|
+
cloudFilesMutationToastMiddleware
|
|
30
|
+
),
|
|
31
|
+
devTools: process.env.NODE_ENV !== "production"
|
|
20
32
|
});
|
|
21
33
|
sagaMiddleware.run(function* chatRootSaga() {
|
|
22
34
|
for (const saga of chatSagas()) yield fork(saga);
|
|
@@ -15,7 +15,7 @@ function findUndeclaredLoadedValues(surfaceName, scope) {
|
|
|
15
15
|
}
|
|
16
16
|
const announced = /* @__PURE__ */ new Set();
|
|
17
17
|
function announceUndeclaredLoadedValues(surfaceName, scope) {
|
|
18
|
-
const mode =
|
|
18
|
+
const mode = process.env.NODE_ENV;
|
|
19
19
|
if (mode === "production") return;
|
|
20
20
|
const issues = findUndeclaredLoadedValues(surfaceName, scope);
|
|
21
21
|
if (issues.length === 0) return;
|
|
@@ -1197,7 +1197,7 @@ function reportUnwiredTarget(surfaceName, target) {
|
|
|
1197
1197
|
if (reportedUnwiredTargets.has(key)) return;
|
|
1198
1198
|
reportedUnwiredTargets.add(key);
|
|
1199
1199
|
const message = `[surface-writeback] Surface "${surfaceName}" declares agent-writable target "${target.name}", but the mounted page registered no handler for it \u2014 agents are not offered it here. Register it with useSurfaceWriteHandlers (or getWriteHandlers) on the component that owns that state, or drop the declaration from the manifest.`;
|
|
1200
|
-
if (
|
|
1200
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1201
1201
|
console.warn(message);
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
@@ -95,7 +95,7 @@ const SURFACE_ROUTE_MAPPINGS = [
|
|
|
95
95
|
{ prefix: "/work", surface: "matrx-user/ai-work" },
|
|
96
96
|
{ prefix: "/files", surface: "matrx-user/files" },
|
|
97
97
|
{ prefix: "/projects", surface: "matrx-user/projects" },
|
|
98
|
-
{ prefix: "/pick-lists", surface: "matrx-user/lists" },
|
|
98
|
+
{ prefix: "/pick-lists", surface: "matrx-user/pick-lists" },
|
|
99
99
|
{ prefix: "/tools/pdf-extractor", surface: "matrx-user/pdf-extractor" },
|
|
100
100
|
{ prefix: "/tools/scanner", surface: "matrx-user/scanner" },
|
|
101
101
|
{ prefix: "/documents", surface: "matrx-user/documents" },
|
|
@@ -31,7 +31,7 @@ function getSurfaceValueLabel(surfaceName, valueName) {
|
|
|
31
31
|
(v) => v.name === valueName
|
|
32
32
|
);
|
|
33
33
|
if (!value) {
|
|
34
|
-
if (
|
|
34
|
+
if (process.env.NODE_ENV !== "production") {
|
|
35
35
|
console.error(
|
|
36
36
|
`[surfaces] getSurfaceValueLabel: "${valueName}" is not declared on "${surfaceName}" \u2014 declare it in the manifest (completeness law).`
|
|
37
37
|
);
|
|
@@ -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",
|
|
@@ -201,17 +201,17 @@
|
|
|
201
201
|
"server-only": "^0.0.1",
|
|
202
202
|
"uuid": "^14.0.2",
|
|
203
203
|
"zod": "^4.6.5",
|
|
204
|
+
"@ai-matrx/agents": "latest",
|
|
204
205
|
"@ai-matrx/alchemy": "latest",
|
|
205
206
|
"@ai-matrx/associations": "latest",
|
|
206
207
|
"@ai-matrx/browser-audio": "latest",
|
|
207
208
|
"@ai-matrx/canvas": "latest",
|
|
208
209
|
"@ai-matrx/content-ir": "latest",
|
|
209
|
-
"@ai-matrx/agents": "latest",
|
|
210
210
|
"@ai-matrx/content-ir-react": "latest",
|
|
211
211
|
"@ai-matrx/data": "latest",
|
|
212
212
|
"@ai-matrx/diff": "latest",
|
|
213
|
-
"@ai-matrx/icons": "latest",
|
|
214
213
|
"@ai-matrx/design-system": "latest",
|
|
214
|
+
"@ai-matrx/icons": "latest",
|
|
215
215
|
"@ai-matrx/kit": "latest",
|
|
216
216
|
"@ai-matrx/media": "latest",
|
|
217
217
|
"@ai-matrx/print": "latest",
|