@truefoundry/assistant-ui-runtime 0.1.10 → 0.1.12
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 +40 -0
- package/dist/{chunk-6ZOGBD7E.js → chunk-2NLIAJJX.js} +8 -1
- package/dist/{chunk-6ZOGBD7E.js.map → chunk-2NLIAJJX.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/plugins/truefoundry-agent-server-adapter/index.d.ts +3 -3
- package/dist/plugins/truefoundry-agent-server-adapter/index.js +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/{types-Bb8Kaf1h.d.ts → types-CSRQSnHu.d.ts} +141 -78
- package/package.json +1 -1
- package/src/convertTurnMessages.test.ts +123 -0
- package/src/convertTurnMessages.ts +8 -2
- package/src/draft/truefoundryDraftThreadListAdapter.test.ts +3 -2
- package/src/index.ts +27 -0
- package/src/plugins/truefoundry-agent-server-adapter/createTrueFoundryAgentUIServer.ts +7 -0
- package/src/plugins/truefoundry-agent-server-adapter/types.ts +2 -2
- package/src/server/index.ts +15 -0
- package/src/server/types.ts +447 -385
- package/src/sessionThreadMetadata.ts +5 -2
- package/src/truefoundryOwnedSessionsThreadListAdapter.test.ts +2 -1
- package/src/truefoundryThreadListAdapter.test.ts +1 -1
|
@@ -24,7 +24,7 @@ export function sessionDisplayTitle(
|
|
|
24
24
|
return session.title ?? session.agentName ?? session.id;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/** Map a Session DTO onto RemoteThreadMetadata
|
|
27
|
+
/** Map a Session DTO onto RemoteThreadMetadata (mutability + display name in custom). */
|
|
28
28
|
export function sessionToThreadMetadata(
|
|
29
29
|
session: Session,
|
|
30
30
|
title: string | undefined,
|
|
@@ -34,6 +34,9 @@ export function sessionToThreadMetadata(
|
|
|
34
34
|
remoteId: session.id,
|
|
35
35
|
title,
|
|
36
36
|
lastMessageAt: new Date(session.updatedAt),
|
|
37
|
-
|
|
37
|
+
custom: {
|
|
38
|
+
isMutable: session.isMutable,
|
|
39
|
+
...(session.agentName != null ? { agentName: session.agentName } : {}),
|
|
40
|
+
},
|
|
38
41
|
};
|
|
39
42
|
}
|
|
@@ -61,13 +61,14 @@ describe("createTrueFoundryOwnedSessionsThreadListAdapter", () => {
|
|
|
61
61
|
remoteId: "s1",
|
|
62
62
|
title: "Named chat",
|
|
63
63
|
lastMessageAt: new Date("2026-06-30T12:00:00.000Z"),
|
|
64
|
-
custom: { agentName: "my-agent" },
|
|
64
|
+
custom: { isMutable: false, agentName: "my-agent" },
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
status: "regular",
|
|
68
68
|
remoteId: "d1",
|
|
69
69
|
title: "Draft chat",
|
|
70
70
|
lastMessageAt: new Date("2026-06-30T11:00:00.000Z"),
|
|
71
|
+
custom: { isMutable: true },
|
|
71
72
|
},
|
|
72
73
|
]);
|
|
73
74
|
expect(result.nextCursor).toBe("page-2");
|
|
@@ -63,7 +63,7 @@ describe("createTrueFoundryThreadListAdapter", () => {
|
|
|
63
63
|
remoteId: "s1",
|
|
64
64
|
title: "First",
|
|
65
65
|
lastMessageAt: new Date("2026-06-30T10:00:00.000Z"),
|
|
66
|
-
custom: { agentName: "my-agent" },
|
|
66
|
+
custom: { isMutable: false, agentName: "my-agent" },
|
|
67
67
|
},
|
|
68
68
|
]);
|
|
69
69
|
expect(result.nextCursor).toBe("page-2");
|