@agentprojectcontext/apx 1.49.0 → 1.50.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/package.json +1 -1
- package/src/host/daemon/api/conversations.js +14 -1
- package/src/interfaces/web/dist/assets/{index-lu6lfr1N.js → index-rx9XIp5S.js} +3 -3
- package/src/interfaces/web/dist/assets/{index-lu6lfr1N.js.map → index-rx9XIp5S.js.map} +1 -1
- package/src/interfaces/web/dist/index.html +1 -1
- package/src/interfaces/web/src/hooks/useChat.ts +1 -1
- package/src/interfaces/web/src/screens/SettingsScreen.tsx +1 -1
package/package.json
CHANGED
|
@@ -32,7 +32,20 @@ export function register(app, { project, config }) {
|
|
|
32
32
|
if (!p) return;
|
|
33
33
|
const conv = readConversation(p.storagePath, req.params.slug, req.params.id);
|
|
34
34
|
if (!conv) return res.status(404).json({ error: "conversation not found" });
|
|
35
|
-
|
|
35
|
+
// Shape the response as the `ConversationDetail` the web client expects:
|
|
36
|
+
// `messages[]` (mapped from the parsed `turns`) + id/agent/channel. Without
|
|
37
|
+
// this the client's `detail.messages.filter(...)` throws on every load.
|
|
38
|
+
res.json({
|
|
39
|
+
id: req.params.id,
|
|
40
|
+
agent_slug: req.params.slug,
|
|
41
|
+
channel: conv.fm?.channel,
|
|
42
|
+
messages: (conv.turns || []).map((t) => ({
|
|
43
|
+
role: t.role,
|
|
44
|
+
content: t.content,
|
|
45
|
+
ts: t.ts,
|
|
46
|
+
})),
|
|
47
|
+
meta: conv.fm || {},
|
|
48
|
+
});
|
|
36
49
|
});
|
|
37
50
|
|
|
38
51
|
async function handleCompact(req, res, filename) {
|