mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-16 20:46:08 +00:00
♻️ refactor: refactor to remove meta in message (#11103)
* ♻️ refactor: refactor to remove meta in message * ✅ test: update test fixtures to remove deprecated meta field - Update 8 snapshots in prompts package for groupChat tests - Remove meta field from 36 JSON fixtures in conversation-flow package - Updated both inputs and outputs fixtures - Covers: linear-conversation, tasks, branch, compare, agentCouncil, agentGroup, assistantGroup scenarios 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
updatedAt: 1704067206000,
|
||||
},
|
||||
@@ -112,7 +111,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
parentId: 'msg-broadcast-tool-1',
|
||||
createdAt: 1704067205000,
|
||||
updatedAt: 1704067205000,
|
||||
meta: {},
|
||||
tools: [
|
||||
{
|
||||
id: 'tool-1',
|
||||
@@ -130,7 +128,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
],
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
updatedAt: 1704067206000,
|
||||
},
|
||||
@@ -206,7 +203,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
],
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
updatedAt: 1704067206000,
|
||||
},
|
||||
@@ -252,16 +248,13 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
id: 'msg-agent-1',
|
||||
role: 'assistant',
|
||||
content: 'Response from agent 1',
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'msg-agent-2',
|
||||
role: 'assistant',
|
||||
content: 'Response from agent 2',
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
updatedAt: 1704067206000,
|
||||
},
|
||||
@@ -297,7 +290,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
content: '',
|
||||
id: 'agentCouncil-msg-1',
|
||||
members: [],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
},
|
||||
];
|
||||
@@ -316,7 +308,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
{
|
||||
content: '',
|
||||
id: 'agentCouncil-msg-1',
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
// No members field
|
||||
},
|
||||
@@ -346,10 +337,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
content: 'Thinking about the query...',
|
||||
signature: 'sig-123',
|
||||
},
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
},
|
||||
];
|
||||
@@ -380,10 +369,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
type: 'InvalidAPIKey',
|
||||
message: 'API key is invalid',
|
||||
},
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
},
|
||||
];
|
||||
@@ -414,10 +401,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
{ id: 'img-1', url: 'https://example.com/img1.jpg', alt: 'Image 1' },
|
||||
{ id: 'img-2', url: 'https://example.com/img2.jpg', alt: 'Image 2' },
|
||||
],
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
},
|
||||
];
|
||||
@@ -448,10 +433,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
threadId: 'thread-1',
|
||||
groupId: 'group-1',
|
||||
topicId: 'topic-1',
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
},
|
||||
];
|
||||
@@ -479,10 +462,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
role: 'assistantGroup',
|
||||
content: '',
|
||||
children: [],
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
},
|
||||
];
|
||||
@@ -585,7 +566,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
meta: {},
|
||||
role: 'agentCouncil',
|
||||
updatedAt: 1704067206000,
|
||||
},
|
||||
|
||||
@@ -45,7 +45,6 @@ describe('MessageContentProcessor', () => {
|
||||
imageList: [{ url: 'image_url', alt: '', id: 'test' } as ChatImageItem],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -75,7 +74,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -108,7 +106,6 @@ describe('MessageContentProcessor', () => {
|
||||
imageList: [{ url: 'image_url', alt: '', id: 'test' } as ChatImageItem],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -139,7 +136,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -171,7 +167,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -204,7 +199,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -245,7 +239,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -286,7 +279,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -317,7 +309,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -366,7 +357,6 @@ describe('MessageContentProcessor', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'test2',
|
||||
@@ -378,7 +368,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -409,7 +398,6 @@ describe('MessageContentProcessor', () => {
|
||||
videoList: [{ url: 'video_url', alt: 'test video', id: 'test' } as ChatVideoItem],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -440,7 +428,6 @@ describe('MessageContentProcessor', () => {
|
||||
] as ChatVideoItem[],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -476,7 +463,6 @@ describe('MessageContentProcessor', () => {
|
||||
] as ChatVideoItem[],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -510,7 +496,6 @@ describe('MessageContentProcessor', () => {
|
||||
] as ChatVideoItem[],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -550,7 +535,6 @@ describe('MessageContentProcessor', () => {
|
||||
] as ChatVideoItem[],
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -590,7 +574,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -631,7 +614,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -675,7 +657,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -717,7 +698,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -753,7 +733,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -778,7 +757,11 @@ describe('MessageContentProcessor', () => {
|
||||
role: 'assistant',
|
||||
content: JSON.stringify([
|
||||
{ type: 'text', text: 'Analysis result:', thoughtSignature: 'sig-001' },
|
||||
{ type: 'image', image: 'https://s3.example.com/chart.png', thoughtSignature: 'sig-002' },
|
||||
{
|
||||
type: 'image',
|
||||
image: 'https://s3.example.com/chart.png',
|
||||
thoughtSignature: 'sig-002',
|
||||
},
|
||||
{ type: 'text', text: 'Conclusion' },
|
||||
]),
|
||||
metadata: {
|
||||
@@ -786,7 +769,6 @@ describe('MessageContentProcessor', () => {
|
||||
},
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ export class SystemRoleInjector extends BaseProvider {
|
||||
content: this.config.systemRole,
|
||||
createdAt: Date.now(),
|
||||
id: `system-${Date.now()}`,
|
||||
meta: {},
|
||||
role: 'system' as const,
|
||||
updatedAt: Date.now(),
|
||||
};
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -16,7 +15,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {},
|
||||
"tools": [
|
||||
{
|
||||
"id": "call_broadcast_1",
|
||||
@@ -38,7 +36,6 @@
|
||||
"tool_call_id": "call_broadcast_1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"agentCouncil": true
|
||||
}
|
||||
@@ -53,15 +50,11 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 120,
|
||||
"totalTokens": 170,
|
||||
"tps": 45.0,
|
||||
"tps": 45,
|
||||
"ttft": 350,
|
||||
"duration": 2667,
|
||||
"latency": 3017
|
||||
@@ -77,15 +70,11 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205500,
|
||||
"updatedAt": 1704067205500,
|
||||
"meta": {
|
||||
"avatar": "devops",
|
||||
"title": "DevOps Engineer"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 130,
|
||||
"totalTokens": 180,
|
||||
"tps": 52.0,
|
||||
"tps": 52,
|
||||
"ttft": 280,
|
||||
"duration": 2500,
|
||||
"latency": 2780
|
||||
@@ -101,15 +90,11 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {
|
||||
"avatar": "architect",
|
||||
"title": "Software Architect"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 125,
|
||||
"totalTokens": 175,
|
||||
"tps": 48.0,
|
||||
"tps": 48,
|
||||
"ttft": 320,
|
||||
"duration": 2604,
|
||||
"latency": 2924
|
||||
|
||||
+4
-23
@@ -5,8 +5,7 @@
|
||||
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -16,7 +15,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
},
|
||||
@@ -41,7 +39,6 @@
|
||||
"tool_call_id": "call_broadcast_1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"agentCouncil": true
|
||||
}
|
||||
@@ -55,11 +52,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
}
|
||||
"updatedAt": 1704067205000
|
||||
},
|
||||
{
|
||||
"id": "msg-agent-devops-1",
|
||||
@@ -70,11 +63,7 @@
|
||||
"model": "claude-3-5-sonnet-20241022",
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205500,
|
||||
"updatedAt": 1704067205500,
|
||||
"meta": {
|
||||
"avatar": "devops",
|
||||
"title": "DevOps Engineer"
|
||||
}
|
||||
"updatedAt": 1704067205500
|
||||
},
|
||||
{
|
||||
"id": "msg-agent-architect-1",
|
||||
@@ -85,11 +74,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {
|
||||
"avatar": "architect",
|
||||
"title": "Software Architect"
|
||||
}
|
||||
"updatedAt": 1704067206000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-summary",
|
||||
@@ -101,10 +86,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {
|
||||
"avatar": "supervisor",
|
||||
"title": "Supervisor"
|
||||
},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
}
|
||||
|
||||
+3
-13
@@ -5,8 +5,7 @@
|
||||
"content": "Can you ask the backend developer about the API design?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -28,10 +27,6 @@
|
||||
],
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {
|
||||
"avatar": "supervisor",
|
||||
"title": "Supervisor"
|
||||
},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
}
|
||||
@@ -43,8 +38,7 @@
|
||||
"parentId": "msg-supervisor-1",
|
||||
"tool_call_id": "call_speak_1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067202000
|
||||
},
|
||||
{
|
||||
"id": "msg-agent-backend-1",
|
||||
@@ -55,10 +49,6 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
}
|
||||
"updatedAt": 1704067205000
|
||||
}
|
||||
]
|
||||
|
||||
+3
-8
@@ -4,8 +4,7 @@
|
||||
"role": "user",
|
||||
"content": "What's the weather?",
|
||||
"createdAt": 1000,
|
||||
"updatedAt": 1000,
|
||||
"meta": {}
|
||||
"updatedAt": 1000
|
||||
},
|
||||
{
|
||||
"id": "msg-2",
|
||||
@@ -14,7 +13,6 @@
|
||||
"createdAt": 2000,
|
||||
"updatedAt": 2000,
|
||||
"parentId": "msg-1",
|
||||
"meta": {},
|
||||
"tools": [
|
||||
{
|
||||
"id": "tool-1",
|
||||
@@ -32,7 +30,6 @@
|
||||
"createdAt": 3000,
|
||||
"updatedAt": 3000,
|
||||
"parentId": "msg-2",
|
||||
"meta": {},
|
||||
"tool_call_id": "tool-1"
|
||||
},
|
||||
{
|
||||
@@ -41,8 +38,7 @@
|
||||
"content": "The weather in New York is 72F and sunny.",
|
||||
"createdAt": 4000,
|
||||
"updatedAt": 4000,
|
||||
"parentId": "tool-1",
|
||||
"meta": {}
|
||||
"parentId": "tool-1"
|
||||
},
|
||||
{
|
||||
"id": "msg-4",
|
||||
@@ -50,7 +46,6 @@
|
||||
"content": "Thanks! How about tomorrow?",
|
||||
"createdAt": 5000,
|
||||
"updatedAt": 5000,
|
||||
"parentId": "msg-3",
|
||||
"meta": {}
|
||||
"parentId": "msg-3"
|
||||
}
|
||||
]
|
||||
|
||||
+21
-17
@@ -5,8 +5,7 @@
|
||||
"content": "What's the weather like in San Francisco and Beijing today?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-102",
|
||||
@@ -31,7 +30,6 @@
|
||||
],
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 28,
|
||||
"totalOutputTokens": 45,
|
||||
@@ -48,22 +46,26 @@
|
||||
"role": "tool",
|
||||
"tool_call_id": "tool-sf",
|
||||
"content": "{\"location\": \"San Francisco, CA\", \"temperature\": 18, \"conditions\": \"Partly Cloudy\", \"humidity\": 72, \"wind_speed\": 15}",
|
||||
"pluginState": { "cached": false, "executionTime": 234 },
|
||||
"pluginState": {
|
||||
"cached": false,
|
||||
"executionTime": 234
|
||||
},
|
||||
"parentId": "msg-102",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203000
|
||||
},
|
||||
{
|
||||
"id": "msg-104",
|
||||
"role": "tool",
|
||||
"tool_call_id": "tool-bj",
|
||||
"content": "{\"location\": \"Beijing, China\", \"temperature\": 12, \"conditions\": \"Clear\", \"humidity\": 45, \"wind_speed\": 8}",
|
||||
"pluginState": { "cached": false, "executionTime": 189 },
|
||||
"pluginState": {
|
||||
"cached": false,
|
||||
"executionTime": 189
|
||||
},
|
||||
"parentId": "msg-102",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203100
|
||||
},
|
||||
{
|
||||
"id": "msg-105",
|
||||
@@ -88,7 +90,6 @@
|
||||
],
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 42,
|
||||
@@ -106,22 +107,26 @@
|
||||
"role": "tool",
|
||||
"tool_call_id": "tool-sf-forecast",
|
||||
"content": "{\"location\": \"San Francisco, CA\", \"date\": \"2024-01-02\", \"high\": 20, \"low\": 14, \"conditions\": \"Sunny\"}",
|
||||
"pluginState": { "cached": false, "executionTime": 198 },
|
||||
"pluginState": {
|
||||
"cached": false,
|
||||
"executionTime": 198
|
||||
},
|
||||
"parentId": "msg-105",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067206000
|
||||
},
|
||||
{
|
||||
"id": "msg-107",
|
||||
"role": "tool",
|
||||
"tool_call_id": "tool-bj-forecast",
|
||||
"content": "{\"location\": \"Beijing, China\", \"date\": \"2024-01-02\", \"high\": 15, \"low\": 8, \"conditions\": \"Partly Cloudy\"}",
|
||||
"pluginState": { "cached": false, "executionTime": 176 },
|
||||
"pluginState": {
|
||||
"cached": false,
|
||||
"executionTime": 176
|
||||
},
|
||||
"parentId": "msg-105",
|
||||
"createdAt": 1704067206100,
|
||||
"updatedAt": 1704067206100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067206100
|
||||
},
|
||||
{
|
||||
"id": "msg-108",
|
||||
@@ -130,7 +135,6 @@
|
||||
"parentId": "msg-106",
|
||||
"createdAt": 1704067208000,
|
||||
"updatedAt": 1704067208000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 245,
|
||||
"totalOutputTokens": 112,
|
||||
|
||||
+15
-15
@@ -5,8 +5,7 @@
|
||||
"content": "Help me debug this Python code that's throwing an error",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-502",
|
||||
@@ -31,7 +30,6 @@
|
||||
],
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 32,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -39,7 +37,7 @@
|
||||
"cost": 0.00024
|
||||
},
|
||||
"performance": {
|
||||
"tps": 45.0
|
||||
"tps": 45
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -47,23 +45,28 @@
|
||||
"role": "tool",
|
||||
"tool_call_id": "tool-lint",
|
||||
"content": "{\"status\":\"success\",\"issues\":[{\"line\":15,\"message\":\"undefined variable 'result'\"}]}",
|
||||
"pluginState": { "cached": false },
|
||||
"pluginState": {
|
||||
"cached": false
|
||||
},
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203000
|
||||
},
|
||||
{
|
||||
"id": "msg-504",
|
||||
"role": "tool",
|
||||
"tool_call_id": "tool-test",
|
||||
"content": "{\"status\":\"failed\",\"error\":\"NameError: name 'result' is not defined\"}",
|
||||
"pluginState": { "cached": false },
|
||||
"pluginError": { "type": "NameError", "message": "name 'result' is not defined" },
|
||||
"pluginState": {
|
||||
"cached": false
|
||||
},
|
||||
"pluginError": {
|
||||
"type": "NameError",
|
||||
"message": "name 'result' is not defined"
|
||||
},
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203100
|
||||
},
|
||||
{
|
||||
"id": "msg-505",
|
||||
@@ -71,8 +74,7 @@
|
||||
"content": "Here's the code:\n```python\ndef calculate():\n x = 5\n y = 10\n print(result)\n```",
|
||||
"parentId": "msg-504",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
{
|
||||
"id": "msg-506",
|
||||
@@ -81,7 +83,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067213000,
|
||||
"updatedAt": 1704067213000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 89,
|
||||
@@ -96,7 +97,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067213100,
|
||||
"updatedAt": 1704067213100,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 72,
|
||||
|
||||
+3
-13
@@ -6,7 +6,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -18,7 +17,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 28,
|
||||
@@ -33,7 +31,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 24,
|
||||
@@ -48,7 +45,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203200,
|
||||
"updatedAt": 1704067203200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 26,
|
||||
@@ -62,8 +58,7 @@
|
||||
"content": "I like the first one best!",
|
||||
"parentId": "msg-202",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-206",
|
||||
@@ -72,7 +67,6 @@
|
||||
"parentId": "msg-205",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 52,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -86,8 +80,7 @@
|
||||
"content": "Actually, I prefer the second one with the dancing variables.",
|
||||
"parentId": "msg-203",
|
||||
"createdAt": 1704067225000,
|
||||
"updatedAt": 1704067225000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067225000
|
||||
},
|
||||
{
|
||||
"id": "msg-208",
|
||||
@@ -96,7 +89,6 @@
|
||||
"parentId": "msg-207",
|
||||
"createdAt": 1704067227000,
|
||||
"updatedAt": 1704067227000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 48,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -110,8 +102,7 @@
|
||||
"content": "Yes, please write one more about debugging!",
|
||||
"parentId": "msg-206",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067230000
|
||||
},
|
||||
{
|
||||
"id": "msg-210",
|
||||
@@ -120,7 +111,6 @@
|
||||
"parentId": "msg-209",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 78,
|
||||
"totalOutputTokens": 24,
|
||||
|
||||
+2
-9
@@ -5,8 +5,7 @@
|
||||
"content": "Can you help me write a function to calculate fibonacci?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-402",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-401",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 15,
|
||||
"totalOutputTokens": 12,
|
||||
@@ -31,7 +29,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 45,
|
||||
@@ -46,7 +43,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -61,7 +57,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205200,
|
||||
"updatedAt": 1704067205200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 58,
|
||||
@@ -75,8 +70,7 @@
|
||||
"content": "The iterative approach looks good! Can you add some comments?",
|
||||
"parentId": "msg-404",
|
||||
"createdAt": 1704067215000,
|
||||
"updatedAt": 1704067215000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067215000
|
||||
},
|
||||
{
|
||||
"id": "msg-407",
|
||||
@@ -85,7 +79,6 @@
|
||||
"parentId": "msg-406",
|
||||
"createdAt": 1704067217000,
|
||||
"updatedAt": 1704067217000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 95,
|
||||
"totalOutputTokens": 78,
|
||||
|
||||
-11
@@ -10,7 +10,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -42,7 +41,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -62,7 +60,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -94,7 +91,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -128,7 +124,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -162,7 +157,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -179,7 +173,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -194,7 +187,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -208,7 +200,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -223,7 +214,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -241,7 +231,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
|
||||
+5
-15
@@ -5,8 +5,7 @@
|
||||
"content": "What's the difference between map and forEach in JavaScript?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-502",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-501",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 18,
|
||||
"totalOutputTokens": 42,
|
||||
@@ -30,8 +28,7 @@
|
||||
"content": "Can you show me a practical example?",
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
{
|
||||
"id": "msg-504",
|
||||
@@ -40,7 +37,6 @@
|
||||
"parentId": "msg-503",
|
||||
"createdAt": 1704067212000,
|
||||
"updatedAt": 1704067212000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 68,
|
||||
"totalOutputTokens": 95,
|
||||
@@ -54,8 +50,7 @@
|
||||
"content": "Thanks! What about performance differences?",
|
||||
"parentId": "msg-504",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-506",
|
||||
@@ -64,7 +59,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 175,
|
||||
"totalOutputTokens": 58,
|
||||
@@ -78,8 +72,7 @@
|
||||
"content": "Can you explain the technical implementation details?",
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067210100,
|
||||
"updatedAt": 1704067210100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210100
|
||||
},
|
||||
{
|
||||
"id": "msg-508",
|
||||
@@ -88,7 +81,6 @@
|
||||
"parentId": "msg-507",
|
||||
"createdAt": 1704067212100,
|
||||
"updatedAt": 1704067212100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 68,
|
||||
"totalOutputTokens": 82,
|
||||
@@ -102,8 +94,7 @@
|
||||
"content": "What about memory usage?",
|
||||
"parentId": "msg-508",
|
||||
"createdAt": 1704067220100,
|
||||
"updatedAt": 1704067220100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220100
|
||||
},
|
||||
{
|
||||
"id": "msg-510",
|
||||
@@ -112,7 +103,6 @@
|
||||
"parentId": "msg-509",
|
||||
"createdAt": 1704067222100,
|
||||
"updatedAt": 1704067222100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 160,
|
||||
"totalOutputTokens": 68,
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"content": "Write a haiku about programming",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-202",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 28,
|
||||
@@ -30,7 +28,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 24,
|
||||
@@ -45,7 +42,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203200,
|
||||
"updatedAt": 1704067203200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 26,
|
||||
@@ -59,8 +55,7 @@
|
||||
"content": "I like the first one best!",
|
||||
"parentId": "msg-202",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-206",
|
||||
@@ -69,7 +64,6 @@
|
||||
"parentId": "msg-205",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 52,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -83,8 +77,7 @@
|
||||
"content": "Actually, I prefer the second one with the dancing variables.",
|
||||
"parentId": "msg-203",
|
||||
"createdAt": 1704067225000,
|
||||
"updatedAt": 1704067225000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067225000
|
||||
},
|
||||
{
|
||||
"id": "msg-208",
|
||||
@@ -93,7 +86,6 @@
|
||||
"parentId": "msg-207",
|
||||
"createdAt": 1704067227000,
|
||||
"updatedAt": 1704067227000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 48,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -107,8 +99,7 @@
|
||||
"content": "Yes, please write one more about debugging!",
|
||||
"parentId": "msg-206",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067230000
|
||||
},
|
||||
{
|
||||
"id": "msg-210",
|
||||
@@ -117,7 +108,6 @@
|
||||
"parentId": "msg-209",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 78,
|
||||
"totalOutputTokens": 24,
|
||||
|
||||
-13
@@ -6,7 +6,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 2
|
||||
}
|
||||
@@ -18,7 +17,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 3751,
|
||||
"totalInputTokens": 3441,
|
||||
@@ -41,7 +39,6 @@
|
||||
"parentId": "msg-assistant-1",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"tool_call_id": "call-1",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -66,7 +63,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1704067208000,
|
||||
"updatedAt": 1704067208000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 4311,
|
||||
"totalInputTokens": 4128,
|
||||
@@ -89,7 +85,6 @@
|
||||
"parentId": "msg-assistant-2",
|
||||
"createdAt": 1704067211000,
|
||||
"updatedAt": 1704067211000,
|
||||
"meta": {},
|
||||
"tool_call_id": "call-2",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -104,7 +99,6 @@
|
||||
"parentId": "msg-tool-2",
|
||||
"createdAt": 1704067214000,
|
||||
"updatedAt": 1704067214000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 6643,
|
||||
"totalInputTokens": 6135,
|
||||
@@ -121,7 +115,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 3809,
|
||||
"totalInputTokens": 3440,
|
||||
@@ -151,7 +144,6 @@
|
||||
"parentId": "msg-assistant-4",
|
||||
"createdAt": 1704067223000,
|
||||
"updatedAt": 1704067223000,
|
||||
"meta": {},
|
||||
"tool_call_id": "call-3",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -170,7 +162,6 @@
|
||||
"parentId": "msg-assistant-4",
|
||||
"createdAt": 1704067226000,
|
||||
"updatedAt": 1704067226000,
|
||||
"meta": {},
|
||||
"tool_call_id": "call-4",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -189,7 +180,6 @@
|
||||
"parentId": "msg-tool-4",
|
||||
"createdAt": 1704067229000,
|
||||
"updatedAt": 1704067229000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 7100,
|
||||
"totalInputTokens": 6425,
|
||||
@@ -203,7 +193,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067240000,
|
||||
"updatedAt": 1704067240000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 3627,
|
||||
"totalInputTokens": 3441,
|
||||
@@ -226,7 +215,6 @@
|
||||
"parentId": "msg-assistant-6",
|
||||
"createdAt": 1704067243000,
|
||||
"updatedAt": 1704067243000,
|
||||
"meta": {},
|
||||
"tool_call_id": "call-5",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -250,7 +238,6 @@
|
||||
"parentId": "msg-tool-5",
|
||||
"createdAt": 1704067246000,
|
||||
"updatedAt": 1704067246000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalTokens": 8188,
|
||||
"totalInputTokens": 7604,
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"content": "What's your favorite programming paradigm?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-302",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 15,
|
||||
@@ -30,7 +28,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202100,
|
||||
"updatedAt": 1704067202100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 12,
|
||||
@@ -45,7 +42,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202200,
|
||||
"updatedAt": 1704067202200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 13,
|
||||
@@ -60,7 +56,6 @@
|
||||
"parentId": "msg-302",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -72,7 +67,6 @@
|
||||
"parentId": "msg-305",
|
||||
"createdAt": 1704067212000,
|
||||
"updatedAt": 1704067212000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 18,
|
||||
@@ -87,7 +81,6 @@
|
||||
"parentId": "msg-305",
|
||||
"createdAt": 1704067212100,
|
||||
"updatedAt": 1704067212100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 22,
|
||||
@@ -101,8 +94,7 @@
|
||||
"content": "What are some benefits of immutability?",
|
||||
"parentId": "msg-307",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-311",
|
||||
@@ -111,7 +103,6 @@
|
||||
"parentId": "msg-310",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 55,
|
||||
"totalOutputTokens": 16,
|
||||
@@ -126,7 +117,6 @@
|
||||
"parentId": "msg-310",
|
||||
"createdAt": 1704067222100,
|
||||
"updatedAt": 1704067222100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 55,
|
||||
"totalOutputTokens": 14,
|
||||
@@ -141,7 +131,6 @@
|
||||
"parentId": "msg-311",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -153,7 +142,6 @@
|
||||
"parentId": "msg-314",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 75,
|
||||
"totalOutputTokens": 35,
|
||||
@@ -168,7 +156,6 @@
|
||||
"parentId": "msg-314",
|
||||
"createdAt": 1704067232100,
|
||||
"updatedAt": 1704067232100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 75,
|
||||
"totalOutputTokens": 42,
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"compare": true
|
||||
}
|
||||
@@ -20,13 +19,12 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 145,
|
||||
"totalTokens": 157,
|
||||
"cost": 0.00471,
|
||||
"tps": 42.0,
|
||||
"tps": 42,
|
||||
"ttft": 387,
|
||||
"duration": 3452,
|
||||
"latency": 3839
|
||||
@@ -41,13 +39,12 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 158,
|
||||
"totalTokens": 170,
|
||||
"cost": 0.00085,
|
||||
"tps": 51.0,
|
||||
"tps": 51,
|
||||
"ttft": 298,
|
||||
"duration": 3098,
|
||||
"latency": 3396,
|
||||
@@ -60,8 +57,7 @@
|
||||
"content": "What about performance differences?",
|
||||
"parentId": "msg-603",
|
||||
"createdAt": 1704067215000,
|
||||
"updatedAt": 1704067215000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067215000
|
||||
},
|
||||
{
|
||||
"id": "msg-605",
|
||||
@@ -70,13 +66,12 @@
|
||||
"parentId": "msg-604",
|
||||
"createdAt": 1704067217000,
|
||||
"updatedAt": 1704067217000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 182,
|
||||
"totalOutputTokens": 167,
|
||||
"totalTokens": 349,
|
||||
"cost": 0.001745,
|
||||
"tps": 48.0,
|
||||
"tps": 48,
|
||||
"ttft": 345,
|
||||
"duration": 3479,
|
||||
"latency": 3824
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"compare": true
|
||||
}
|
||||
@@ -20,13 +19,12 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 198,
|
||||
"totalTokens": 222,
|
||||
"cost": 0.00666,
|
||||
"tps": 45.0,
|
||||
"tps": 45,
|
||||
"ttft": 456,
|
||||
"duration": 4400,
|
||||
"latency": 4856
|
||||
@@ -41,13 +39,12 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 215,
|
||||
"totalTokens": 239,
|
||||
"cost": 0.001195,
|
||||
"tps": 58.0,
|
||||
"tps": 58,
|
||||
"ttft": 312,
|
||||
"duration": 3707,
|
||||
"latency": 4019,
|
||||
@@ -79,13 +76,12 @@
|
||||
],
|
||||
"createdAt": 1704067205200,
|
||||
"updatedAt": 1704067205200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 38,
|
||||
"totalTokens": 62,
|
||||
"cost": 0.000186,
|
||||
"tps": 52.0,
|
||||
"tps": 52,
|
||||
"ttft": 198,
|
||||
"duration": 730,
|
||||
"latency": 928
|
||||
@@ -102,8 +98,7 @@
|
||||
},
|
||||
"parentId": "msg-304",
|
||||
"createdAt": 1704067207540,
|
||||
"updatedAt": 1704067207540,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067207540
|
||||
},
|
||||
{
|
||||
"id": "msg-306",
|
||||
@@ -116,8 +111,7 @@
|
||||
},
|
||||
"parentId": "msg-304",
|
||||
"createdAt": 1704067207552,
|
||||
"updatedAt": 1704067207552,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067207552
|
||||
},
|
||||
{
|
||||
"id": "msg-307",
|
||||
@@ -126,13 +120,12 @@
|
||||
"parentId": "msg-306",
|
||||
"createdAt": 1704067208000,
|
||||
"updatedAt": 1704067208000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 134,
|
||||
"totalTokens": 290,
|
||||
"cost": 0.00087,
|
||||
"tps": 48.0,
|
||||
"tps": 48,
|
||||
"ttft": 234,
|
||||
"duration": 2791,
|
||||
"latency": 3025
|
||||
@@ -144,8 +137,7 @@
|
||||
"content": "Great analysis! Can you explain why QuickSort has better cache locality?",
|
||||
"parentId": "msg-303",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-309",
|
||||
@@ -154,13 +146,12 @@
|
||||
"parentId": "msg-308",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 268,
|
||||
"totalOutputTokens": 176,
|
||||
"totalTokens": 444,
|
||||
"cost": 0.00222,
|
||||
"tps": 52.0,
|
||||
"tps": 52,
|
||||
"ttft": 312,
|
||||
"duration": 3384,
|
||||
"latency": 3696
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"content": "Can you help me write a Python function to check if a number is prime?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-002",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-001",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 156,
|
||||
@@ -23,7 +21,7 @@
|
||||
"cost": 0.00054
|
||||
},
|
||||
"performance": {
|
||||
"tps": 52.0,
|
||||
"tps": 52,
|
||||
"ttft": 234,
|
||||
"duration": 3000,
|
||||
"latency": 3234
|
||||
@@ -35,8 +33,7 @@
|
||||
"content": "Thanks! Can you add some test cases?",
|
||||
"parentId": "msg-002",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
{
|
||||
"id": "msg-004",
|
||||
@@ -45,7 +42,6 @@
|
||||
"parentId": "msg-003",
|
||||
"createdAt": 1704067213000,
|
||||
"updatedAt": 1704067213000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 180,
|
||||
"totalOutputTokens": 89,
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"content": "Help me create two tasks to research the weather in Hangzhou and Beijing tomorrow.",
|
||||
"parentId": null,
|
||||
"createdAt": 1735526559382,
|
||||
"updatedAt": 1735526559382,
|
||||
"meta": {}
|
||||
"updatedAt": 1735526559382
|
||||
},
|
||||
{
|
||||
"id": "msg-assistant-1",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1735526560163,
|
||||
"updatedAt": 1735526585550,
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"tools": [
|
||||
@@ -46,7 +44,6 @@
|
||||
"tool_call_id": "call_exec_tasks_1",
|
||||
"createdAt": 1735526588116,
|
||||
"updatedAt": 1735526591337,
|
||||
"meta": {},
|
||||
"plugin": {
|
||||
"apiName": "execTasks",
|
||||
"arguments": "{\"tasks\": [{\"description\": \"Research Hangzhou weather\", \"instruction\": \"Search for Hangzhou weather tomorrow.\"}, {\"description\": \"Research Beijing weather\", \"instruction\": \"Search for Beijing weather tomorrow.\"}]}",
|
||||
@@ -75,7 +72,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526756262,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"instruction": "Search for Hangzhou weather tomorrow."
|
||||
},
|
||||
@@ -97,7 +93,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526595647,
|
||||
"updatedAt": 1735526792430,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"instruction": "Search for Beijing weather tomorrow."
|
||||
},
|
||||
@@ -119,7 +114,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526795651,
|
||||
"updatedAt": 1735526813171,
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"metadata": {
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"content": "Create three parallel tasks to research AI topics.",
|
||||
"parentId": null,
|
||||
"createdAt": 1735526559382,
|
||||
"updatedAt": 1735526559382,
|
||||
"meta": {}
|
||||
"updatedAt": 1735526559382
|
||||
},
|
||||
{
|
||||
"id": "msg-assistant-1",
|
||||
@@ -15,7 +14,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1735526560163,
|
||||
"updatedAt": 1735526585550,
|
||||
"meta": {},
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"tools": [
|
||||
@@ -36,13 +34,18 @@
|
||||
"tool_call_id": "call_exec_tasks_1",
|
||||
"createdAt": 1735526588116,
|
||||
"updatedAt": 1735526591337,
|
||||
"meta": {},
|
||||
"pluginState": {
|
||||
"type": "execTasks",
|
||||
"tasks": [
|
||||
{ "description": "Research LLM architectures" },
|
||||
{ "description": "Research AI agents" },
|
||||
{ "description": "Research RAG systems" }
|
||||
{
|
||||
"description": "Research LLM architectures"
|
||||
},
|
||||
{
|
||||
"description": "Research AI agents"
|
||||
},
|
||||
{
|
||||
"description": "Research RAG systems"
|
||||
}
|
||||
],
|
||||
"parentMessageId": "msg-tool-1"
|
||||
}
|
||||
@@ -54,7 +57,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526756262,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 120000,
|
||||
"status": "completed",
|
||||
@@ -72,7 +74,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526595647,
|
||||
"updatedAt": 1735526792430,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 150000,
|
||||
"status": "completed",
|
||||
@@ -90,7 +91,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526596000,
|
||||
"updatedAt": 1735526800000,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 130000,
|
||||
"status": "completed",
|
||||
@@ -108,7 +108,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526810000,
|
||||
"updatedAt": 1735526820000,
|
||||
"meta": {},
|
||||
"model": "gpt-4",
|
||||
"provider": "openai"
|
||||
}
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -53,7 +52,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {},
|
||||
"children": [
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -96,10 +94,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 120,
|
||||
@@ -120,10 +114,6 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205500,
|
||||
"updatedAt": 1704067205500,
|
||||
"meta": {
|
||||
"avatar": "devops",
|
||||
"title": "DevOps Engineer"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 130,
|
||||
@@ -144,10 +134,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {
|
||||
"avatar": "architect",
|
||||
"title": "Software Architect"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 125,
|
||||
@@ -159,7 +145,6 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"meta": {},
|
||||
"role": "agentCouncil",
|
||||
"updatedAt": 1704067206000
|
||||
}
|
||||
@@ -171,8 +156,7 @@
|
||||
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-supervisor-1": {
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -182,7 +166,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {},
|
||||
"tools": [
|
||||
{
|
||||
"id": "call_broadcast_1",
|
||||
@@ -204,7 +187,6 @@
|
||||
"tool_call_id": "call_broadcast_1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"agentCouncil": true
|
||||
}
|
||||
@@ -219,10 +201,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 120,
|
||||
@@ -243,10 +221,6 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205500,
|
||||
"updatedAt": 1704067205500,
|
||||
"meta": {
|
||||
"avatar": "devops",
|
||||
"title": "DevOps Engineer"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 130,
|
||||
@@ -267,10 +241,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {
|
||||
"avatar": "architect",
|
||||
"title": "Software Architect"
|
||||
},
|
||||
"metadata": {
|
||||
"totalInputTokens": 50,
|
||||
"totalOutputTokens": 125,
|
||||
|
||||
+8
-46
@@ -46,8 +46,7 @@
|
||||
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -57,7 +56,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
},
|
||||
@@ -105,11 +103,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
}
|
||||
"updatedAt": 1704067205000
|
||||
},
|
||||
{
|
||||
"id": "msg-agent-devops-1",
|
||||
@@ -120,11 +114,7 @@
|
||||
"model": "claude-3-5-sonnet-20241022",
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205500,
|
||||
"updatedAt": 1704067205500,
|
||||
"meta": {
|
||||
"avatar": "devops",
|
||||
"title": "DevOps Engineer"
|
||||
}
|
||||
"updatedAt": 1704067205500
|
||||
},
|
||||
{
|
||||
"id": "msg-agent-architect-1",
|
||||
@@ -135,14 +125,9 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {
|
||||
"avatar": "architect",
|
||||
"title": "Software Architect"
|
||||
}
|
||||
"updatedAt": 1704067206000
|
||||
}
|
||||
],
|
||||
"meta": {},
|
||||
"role": "agentCouncil",
|
||||
"updatedAt": 1704067206000
|
||||
},
|
||||
@@ -156,10 +141,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {
|
||||
"avatar": "supervisor",
|
||||
"title": "Supervisor"
|
||||
},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
},
|
||||
@@ -181,8 +162,7 @@
|
||||
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-supervisor-1": {
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -192,7 +172,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
},
|
||||
@@ -217,7 +196,6 @@
|
||||
"tool_call_id": "call_broadcast_1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"agentCouncil": true
|
||||
}
|
||||
@@ -231,11 +209,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
}
|
||||
"updatedAt": 1704067205000
|
||||
},
|
||||
"msg-agent-devops-1": {
|
||||
"id": "msg-agent-devops-1",
|
||||
@@ -246,11 +220,7 @@
|
||||
"model": "claude-3-5-sonnet-20241022",
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205500,
|
||||
"updatedAt": 1704067205500,
|
||||
"meta": {
|
||||
"avatar": "devops",
|
||||
"title": "DevOps Engineer"
|
||||
}
|
||||
"updatedAt": 1704067205500
|
||||
},
|
||||
"msg-agent-architect-1": {
|
||||
"id": "msg-agent-architect-1",
|
||||
@@ -261,11 +231,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {
|
||||
"avatar": "architect",
|
||||
"title": "Software Architect"
|
||||
}
|
||||
"updatedAt": 1704067206000
|
||||
},
|
||||
"msg-supervisor-summary": {
|
||||
"id": "msg-supervisor-summary",
|
||||
@@ -277,10 +243,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {
|
||||
"avatar": "supervisor",
|
||||
"title": "Supervisor"
|
||||
},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
}
|
||||
|
||||
+5
-24
@@ -27,8 +27,7 @@
|
||||
"content": "Can you ask the backend developer about the API design?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -38,10 +37,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {
|
||||
"avatar": "supervisor",
|
||||
"title": "Supervisor"
|
||||
},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
},
|
||||
@@ -81,11 +76,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
}
|
||||
"updatedAt": 1704067205000
|
||||
}
|
||||
],
|
||||
"messageMap": {
|
||||
@@ -95,8 +86,7 @@
|
||||
"content": "Can you ask the backend developer about the API design?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-supervisor-1": {
|
||||
"id": "msg-supervisor-1",
|
||||
@@ -118,10 +108,6 @@
|
||||
],
|
||||
"createdAt": 1704067201000,
|
||||
"updatedAt": 1704067201000,
|
||||
"meta": {
|
||||
"avatar": "supervisor",
|
||||
"title": "Supervisor"
|
||||
},
|
||||
"metadata": {
|
||||
"isSupervisor": true
|
||||
}
|
||||
@@ -133,8 +119,7 @@
|
||||
"parentId": "msg-supervisor-1",
|
||||
"tool_call_id": "call_speak_1",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067202000
|
||||
},
|
||||
"msg-agent-backend-1": {
|
||||
"id": "msg-agent-backend-1",
|
||||
@@ -145,11 +130,7 @@
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {
|
||||
"avatar": "backend-dev",
|
||||
"title": "Backend Developer"
|
||||
}
|
||||
"updatedAt": 1704067205000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-13
@@ -30,8 +30,7 @@
|
||||
"role": "user",
|
||||
"content": "What's the weather?",
|
||||
"createdAt": 1000,
|
||||
"updatedAt": 1000,
|
||||
"meta": {}
|
||||
"updatedAt": 1000
|
||||
},
|
||||
{
|
||||
"id": "msg-2",
|
||||
@@ -40,7 +39,6 @@
|
||||
"createdAt": 2000,
|
||||
"updatedAt": 2000,
|
||||
"parentId": "msg-1",
|
||||
"meta": {},
|
||||
"children": [
|
||||
{
|
||||
"content": "Let me check the weather for you.",
|
||||
@@ -72,8 +70,7 @@
|
||||
"content": "Thanks! How about tomorrow?",
|
||||
"createdAt": 5000,
|
||||
"updatedAt": 5000,
|
||||
"parentId": "msg-3",
|
||||
"meta": {}
|
||||
"parentId": "msg-3"
|
||||
}
|
||||
],
|
||||
"messageMap": {
|
||||
@@ -82,8 +79,7 @@
|
||||
"role": "user",
|
||||
"content": "What's the weather?",
|
||||
"createdAt": 1000,
|
||||
"updatedAt": 1000,
|
||||
"meta": {}
|
||||
"updatedAt": 1000
|
||||
},
|
||||
"msg-2": {
|
||||
"id": "msg-2",
|
||||
@@ -92,7 +88,6 @@
|
||||
"createdAt": 2000,
|
||||
"updatedAt": 2000,
|
||||
"parentId": "msg-1",
|
||||
"meta": {},
|
||||
"tools": [
|
||||
{
|
||||
"id": "tool-1",
|
||||
@@ -110,7 +105,6 @@
|
||||
"createdAt": 3000,
|
||||
"updatedAt": 3000,
|
||||
"parentId": "msg-2",
|
||||
"meta": {},
|
||||
"tool_call_id": "tool-1"
|
||||
},
|
||||
"msg-3": {
|
||||
@@ -119,8 +113,7 @@
|
||||
"content": "The weather in New York is 72F and sunny.",
|
||||
"createdAt": 4000,
|
||||
"updatedAt": 4000,
|
||||
"parentId": "tool-1",
|
||||
"meta": {}
|
||||
"parentId": "tool-1"
|
||||
},
|
||||
"msg-4": {
|
||||
"id": "msg-4",
|
||||
@@ -128,8 +121,7 @@
|
||||
"content": "Thanks! How about tomorrow?",
|
||||
"createdAt": 5000,
|
||||
"updatedAt": 5000,
|
||||
"parentId": "msg-3",
|
||||
"meta": {}
|
||||
"parentId": "msg-3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-16
@@ -32,8 +32,7 @@
|
||||
"content": "What's the weather like in San Francisco and Beijing today?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-102",
|
||||
@@ -42,7 +41,6 @@
|
||||
"parentId": "msg-101",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"children": [
|
||||
{
|
||||
"content": "Let me check the current weather conditions in both cities for you.",
|
||||
@@ -188,8 +186,7 @@
|
||||
"content": "What's the weather like in San Francisco and Beijing today?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-102": {
|
||||
"id": "msg-102",
|
||||
@@ -214,7 +211,6 @@
|
||||
],
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 28,
|
||||
"totalOutputTokens": 45,
|
||||
@@ -237,8 +233,7 @@
|
||||
},
|
||||
"parentId": "msg-102",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203000
|
||||
},
|
||||
"msg-104": {
|
||||
"id": "msg-104",
|
||||
@@ -251,8 +246,7 @@
|
||||
},
|
||||
"parentId": "msg-102",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203100
|
||||
},
|
||||
"msg-105": {
|
||||
"id": "msg-105",
|
||||
@@ -277,7 +271,6 @@
|
||||
],
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 42,
|
||||
@@ -300,8 +293,7 @@
|
||||
},
|
||||
"parentId": "msg-105",
|
||||
"createdAt": 1704067206000,
|
||||
"updatedAt": 1704067206000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067206000
|
||||
},
|
||||
"msg-107": {
|
||||
"id": "msg-107",
|
||||
@@ -314,8 +306,7 @@
|
||||
},
|
||||
"parentId": "msg-105",
|
||||
"createdAt": 1704067206100,
|
||||
"updatedAt": 1704067206100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067206100
|
||||
},
|
||||
"msg-108": {
|
||||
"id": "msg-108",
|
||||
@@ -324,7 +315,6 @@
|
||||
"parentId": "msg-106",
|
||||
"createdAt": 1704067208000,
|
||||
"updatedAt": 1704067208000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 245,
|
||||
"totalOutputTokens": 112,
|
||||
|
||||
+6
-17
@@ -47,8 +47,7 @@
|
||||
"content": "Help me debug this Python code that's throwing an error",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-502",
|
||||
@@ -57,7 +56,6 @@
|
||||
"parentId": "msg-501",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"children": [
|
||||
{
|
||||
"content": "I'll help you debug the code. Let me first check the syntax and run some analysis.",
|
||||
@@ -121,8 +119,7 @@
|
||||
"content": "Here's the code:\n```python\ndef calculate():\n x = 5\n y = 10\n print(result)\n```",
|
||||
"parentId": "msg-504",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
{
|
||||
"id": "msg-506",
|
||||
@@ -131,7 +128,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067213000,
|
||||
"updatedAt": 1704067213000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 89,
|
||||
@@ -151,8 +147,7 @@
|
||||
"content": "Help me debug this Python code that's throwing an error",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-502": {
|
||||
"id": "msg-502",
|
||||
@@ -177,7 +172,6 @@
|
||||
],
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 32,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -198,8 +192,7 @@
|
||||
},
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203000
|
||||
},
|
||||
"msg-504": {
|
||||
"id": "msg-504",
|
||||
@@ -215,8 +208,7 @@
|
||||
},
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067203100
|
||||
},
|
||||
"msg-505": {
|
||||
"id": "msg-505",
|
||||
@@ -224,8 +216,7 @@
|
||||
"content": "Here's the code:\n```python\ndef calculate():\n x = 5\n y = 10\n print(result)\n```",
|
||||
"parentId": "msg-504",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
"msg-506": {
|
||||
"id": "msg-506",
|
||||
@@ -234,7 +225,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067213000,
|
||||
"updatedAt": 1704067213000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 89,
|
||||
@@ -249,7 +239,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067213100,
|
||||
"updatedAt": 1704067213100,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 72,
|
||||
|
||||
+4
-18
@@ -63,7 +63,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -75,7 +74,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 24,
|
||||
@@ -93,8 +91,7 @@
|
||||
"content": "Actually, I prefer the second one with the dancing variables.",
|
||||
"parentId": "msg-203",
|
||||
"createdAt": 1704067225000,
|
||||
"updatedAt": 1704067225000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067225000
|
||||
},
|
||||
{
|
||||
"id": "msg-208",
|
||||
@@ -103,7 +100,6 @@
|
||||
"parentId": "msg-207",
|
||||
"createdAt": 1704067227000,
|
||||
"updatedAt": 1704067227000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 48,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -120,7 +116,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -132,7 +127,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 28,
|
||||
@@ -147,7 +141,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 24,
|
||||
@@ -162,7 +155,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203200,
|
||||
"updatedAt": 1704067203200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 26,
|
||||
@@ -176,8 +168,7 @@
|
||||
"content": "I like the first one best!",
|
||||
"parentId": "msg-202",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
"msg-206": {
|
||||
"id": "msg-206",
|
||||
@@ -186,7 +177,6 @@
|
||||
"parentId": "msg-205",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 52,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -200,8 +190,7 @@
|
||||
"content": "Actually, I prefer the second one with the dancing variables.",
|
||||
"parentId": "msg-203",
|
||||
"createdAt": 1704067225000,
|
||||
"updatedAt": 1704067225000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067225000
|
||||
},
|
||||
"msg-208": {
|
||||
"id": "msg-208",
|
||||
@@ -210,7 +199,6 @@
|
||||
"parentId": "msg-207",
|
||||
"createdAt": 1704067227000,
|
||||
"updatedAt": 1704067227000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 48,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -224,8 +212,7 @@
|
||||
"content": "Yes, please write one more about debugging!",
|
||||
"parentId": "msg-206",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067230000
|
||||
},
|
||||
"msg-210": {
|
||||
"id": "msg-210",
|
||||
@@ -234,7 +221,6 @@
|
||||
"parentId": "msg-209",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 78,
|
||||
"totalOutputTokens": 24,
|
||||
|
||||
+4
-16
@@ -50,8 +50,7 @@
|
||||
"content": "Can you help me write a function to calculate fibonacci?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-402",
|
||||
@@ -60,7 +59,6 @@
|
||||
"parentId": "msg-401",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 15,
|
||||
"totalOutputTokens": 12,
|
||||
@@ -76,7 +74,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -94,8 +91,7 @@
|
||||
"content": "The iterative approach looks good! Can you add some comments?",
|
||||
"parentId": "msg-404",
|
||||
"createdAt": 1704067215000,
|
||||
"updatedAt": 1704067215000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067215000
|
||||
},
|
||||
{
|
||||
"id": "msg-407",
|
||||
@@ -104,7 +100,6 @@
|
||||
"parentId": "msg-406",
|
||||
"createdAt": 1704067217000,
|
||||
"updatedAt": 1704067217000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 95,
|
||||
"totalOutputTokens": 78,
|
||||
@@ -120,8 +115,7 @@
|
||||
"content": "Can you help me write a function to calculate fibonacci?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-402": {
|
||||
"id": "msg-402",
|
||||
@@ -130,7 +124,6 @@
|
||||
"parentId": "msg-401",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 15,
|
||||
"totalOutputTokens": 12,
|
||||
@@ -146,7 +139,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 45,
|
||||
@@ -161,7 +153,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -176,7 +167,6 @@
|
||||
"parentId": "msg-402",
|
||||
"createdAt": 1704067205200,
|
||||
"updatedAt": 1704067205200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 58,
|
||||
@@ -190,8 +180,7 @@
|
||||
"content": "The iterative approach looks good! Can you add some comments?",
|
||||
"parentId": "msg-404",
|
||||
"createdAt": 1704067215000,
|
||||
"updatedAt": 1704067215000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067215000
|
||||
},
|
||||
"msg-407": {
|
||||
"id": "msg-407",
|
||||
@@ -200,7 +189,6 @@
|
||||
"parentId": "msg-406",
|
||||
"createdAt": 1704067217000,
|
||||
"updatedAt": 1704067217000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 95,
|
||||
"totalOutputTokens": 78,
|
||||
|
||||
-19
@@ -71,7 +71,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -103,7 +102,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -123,7 +121,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -155,7 +152,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": [],
|
||||
@@ -176,7 +172,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -190,7 +185,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -205,7 +199,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
{
|
||||
@@ -223,7 +216,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -241,7 +233,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
"msg_xXSCL5uzwDANSn": {
|
||||
@@ -273,7 +264,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -293,7 +283,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
"msg_h5nXrbCVGj2uWy": {
|
||||
@@ -325,7 +314,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -359,7 +347,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -393,7 +380,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
@@ -410,7 +396,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
"msg_VMXrVH9hXeCP1R": {
|
||||
@@ -425,7 +410,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
"msg_wpUElxuYslyASJ": {
|
||||
@@ -439,7 +423,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
"msg_LHG8QeuqpcFZml": {
|
||||
@@ -454,7 +437,6 @@
|
||||
"extra": {},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"videoList": []
|
||||
},
|
||||
"msg_jEKKxHQbz5duC6": {
|
||||
@@ -472,7 +454,6 @@
|
||||
},
|
||||
"fileList": [],
|
||||
"imageList": [],
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"videoList": []
|
||||
|
||||
+8
-24
@@ -60,8 +60,7 @@
|
||||
"content": "What's the difference between map and forEach in JavaScript?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-502",
|
||||
@@ -70,7 +69,6 @@
|
||||
"parentId": "msg-501",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 18,
|
||||
"totalOutputTokens": 42,
|
||||
@@ -89,8 +87,7 @@
|
||||
"content": "Can you explain the technical implementation details?",
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067210100,
|
||||
"updatedAt": 1704067210100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210100
|
||||
},
|
||||
{
|
||||
"id": "msg-508",
|
||||
@@ -99,7 +96,6 @@
|
||||
"parentId": "msg-507",
|
||||
"createdAt": 1704067212100,
|
||||
"updatedAt": 1704067212100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 68,
|
||||
"totalOutputTokens": 82,
|
||||
@@ -113,8 +109,7 @@
|
||||
"content": "What about memory usage?",
|
||||
"parentId": "msg-508",
|
||||
"createdAt": 1704067220100,
|
||||
"updatedAt": 1704067220100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220100
|
||||
},
|
||||
{
|
||||
"id": "msg-510",
|
||||
@@ -123,7 +118,6 @@
|
||||
"parentId": "msg-509",
|
||||
"createdAt": 1704067222100,
|
||||
"updatedAt": 1704067222100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 160,
|
||||
"totalOutputTokens": 68,
|
||||
@@ -139,8 +133,7 @@
|
||||
"content": "What's the difference between map and forEach in JavaScript?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-502": {
|
||||
"id": "msg-502",
|
||||
@@ -149,7 +142,6 @@
|
||||
"parentId": "msg-501",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 18,
|
||||
"totalOutputTokens": 42,
|
||||
@@ -164,8 +156,7 @@
|
||||
"content": "Can you show me a practical example?",
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
"msg-504": {
|
||||
"id": "msg-504",
|
||||
@@ -174,7 +165,6 @@
|
||||
"parentId": "msg-503",
|
||||
"createdAt": 1704067212000,
|
||||
"updatedAt": 1704067212000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 68,
|
||||
"totalOutputTokens": 95,
|
||||
@@ -188,8 +178,7 @@
|
||||
"content": "Thanks! What about performance differences?",
|
||||
"parentId": "msg-504",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
"msg-506": {
|
||||
"id": "msg-506",
|
||||
@@ -198,7 +187,6 @@
|
||||
"parentId": "msg-505",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 175,
|
||||
"totalOutputTokens": 58,
|
||||
@@ -212,8 +200,7 @@
|
||||
"content": "Can you explain the technical implementation details?",
|
||||
"parentId": "msg-502",
|
||||
"createdAt": 1704067210100,
|
||||
"updatedAt": 1704067210100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210100
|
||||
},
|
||||
"msg-508": {
|
||||
"id": "msg-508",
|
||||
@@ -222,7 +209,6 @@
|
||||
"parentId": "msg-507",
|
||||
"createdAt": 1704067212100,
|
||||
"updatedAt": 1704067212100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 68,
|
||||
"totalOutputTokens": 82,
|
||||
@@ -236,8 +222,7 @@
|
||||
"content": "What about memory usage?",
|
||||
"parentId": "msg-508",
|
||||
"createdAt": 1704067220100,
|
||||
"updatedAt": 1704067220100,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220100
|
||||
},
|
||||
"msg-510": {
|
||||
"id": "msg-510",
|
||||
@@ -246,7 +231,6 @@
|
||||
"parentId": "msg-509",
|
||||
"createdAt": 1704067222100,
|
||||
"updatedAt": 1704067222100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 160,
|
||||
"totalOutputTokens": 68,
|
||||
|
||||
@@ -62,8 +62,7 @@
|
||||
"content": "Write a haiku about programming",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-202",
|
||||
@@ -72,7 +71,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 28,
|
||||
@@ -90,8 +88,7 @@
|
||||
"content": "I like the first one best!",
|
||||
"parentId": "msg-202",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-206",
|
||||
@@ -100,7 +97,6 @@
|
||||
"parentId": "msg-205",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 52,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -114,8 +110,7 @@
|
||||
"content": "Yes, please write one more about debugging!",
|
||||
"parentId": "msg-206",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067230000
|
||||
},
|
||||
{
|
||||
"id": "msg-210",
|
||||
@@ -124,7 +119,6 @@
|
||||
"parentId": "msg-209",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 78,
|
||||
"totalOutputTokens": 24,
|
||||
@@ -140,8 +134,7 @@
|
||||
"content": "Write a haiku about programming",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-202": {
|
||||
"id": "msg-202",
|
||||
@@ -150,7 +143,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203000,
|
||||
"updatedAt": 1704067203000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 28,
|
||||
@@ -165,7 +157,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203100,
|
||||
"updatedAt": 1704067203100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 24,
|
||||
@@ -180,7 +171,6 @@
|
||||
"parentId": "msg-201",
|
||||
"createdAt": 1704067203200,
|
||||
"updatedAt": 1704067203200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 26,
|
||||
@@ -194,8 +184,7 @@
|
||||
"content": "I like the first one best!",
|
||||
"parentId": "msg-202",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
"msg-206": {
|
||||
"id": "msg-206",
|
||||
@@ -204,7 +193,6 @@
|
||||
"parentId": "msg-205",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 52,
|
||||
"totalOutputTokens": 48,
|
||||
@@ -218,8 +206,7 @@
|
||||
"content": "Actually, I prefer the second one with the dancing variables.",
|
||||
"parentId": "msg-203",
|
||||
"createdAt": 1704067225000,
|
||||
"updatedAt": 1704067225000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067225000
|
||||
},
|
||||
"msg-208": {
|
||||
"id": "msg-208",
|
||||
@@ -228,7 +215,6 @@
|
||||
"parentId": "msg-207",
|
||||
"createdAt": 1704067227000,
|
||||
"updatedAt": 1704067227000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 48,
|
||||
"totalOutputTokens": 52,
|
||||
@@ -242,8 +228,7 @@
|
||||
"content": "Yes, please write one more about debugging!",
|
||||
"parentId": "msg-206",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067230000
|
||||
},
|
||||
"msg-210": {
|
||||
"id": "msg-210",
|
||||
@@ -252,7 +237,6 @@
|
||||
"parentId": "msg-209",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 78,
|
||||
"totalOutputTokens": 24,
|
||||
|
||||
-15
@@ -74,7 +74,6 @@
|
||||
"content": "杭州和北京天气如何",
|
||||
"createdAt": 1704067200000,
|
||||
"id": "msg-user-1",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 2
|
||||
},
|
||||
@@ -89,7 +88,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1704067240000,
|
||||
"updatedAt": 1704067240000,
|
||||
"meta": {},
|
||||
"branch": {
|
||||
"activeBranchIndex": 2,
|
||||
"count": 3
|
||||
@@ -149,7 +147,6 @@
|
||||
"content": "",
|
||||
"createdAt": 1704067202000,
|
||||
"id": "msg-assistant-1",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 3441,
|
||||
"totalOutputTokens": 310,
|
||||
@@ -172,7 +169,6 @@
|
||||
"content": "",
|
||||
"createdAt": 1704067208000,
|
||||
"id": "msg-assistant-2",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 4128,
|
||||
"totalOutputTokens": 183,
|
||||
@@ -195,7 +191,6 @@
|
||||
"content": "你是想看现在的实时天气,还是未来几天的天气预报?",
|
||||
"createdAt": 1704067214000,
|
||||
"id": "msg-assistant-3",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 6135,
|
||||
"totalOutputTokens": 508,
|
||||
@@ -212,7 +207,6 @@
|
||||
"content": "",
|
||||
"createdAt": 1704067220000,
|
||||
"id": "msg-assistant-4",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 3440,
|
||||
"totalOutputTokens": 369,
|
||||
@@ -242,7 +236,6 @@
|
||||
"content": "我可以帮你查天气 —— 想确认一下你的偏好再去查实时数据。",
|
||||
"createdAt": 1704067229000,
|
||||
"id": "msg-assistant-5",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 6425,
|
||||
"totalOutputTokens": 675,
|
||||
@@ -256,7 +249,6 @@
|
||||
"content": "",
|
||||
"createdAt": 1704067240000,
|
||||
"id": "msg-assistant-6",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 3441,
|
||||
"totalOutputTokens": 186,
|
||||
@@ -279,7 +271,6 @@
|
||||
"content": "好的——我可以立刻去查并把结果发给你。",
|
||||
"createdAt": 1704067246000,
|
||||
"id": "msg-assistant-7",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 7604,
|
||||
"totalOutputTokens": 584,
|
||||
@@ -293,7 +284,6 @@
|
||||
"content": "<searchResults>\n <item title=\"Weather Site\" url=\"https://weather.example.com/\">Weather information...</item>\n</searchResults>",
|
||||
"createdAt": 1704067205000,
|
||||
"id": "msg-tool-1",
|
||||
"meta": {},
|
||||
"parentId": "msg-assistant-1",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -318,7 +308,6 @@
|
||||
"content": "<searchResults>\n <item title=\"Weather Info\" url=\"https://weather2.example.com/\">More weather...</item>\n</searchResults>",
|
||||
"createdAt": 1704067211000,
|
||||
"id": "msg-tool-2",
|
||||
"meta": {},
|
||||
"parentId": "msg-assistant-2",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -333,7 +322,6 @@
|
||||
"content": "<searchResults />",
|
||||
"createdAt": 1704067223000,
|
||||
"id": "msg-tool-3",
|
||||
"meta": {},
|
||||
"parentId": "msg-assistant-4",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -352,7 +340,6 @@
|
||||
"content": "<searchResults />",
|
||||
"createdAt": 1704067226000,
|
||||
"id": "msg-tool-4",
|
||||
"meta": {},
|
||||
"parentId": "msg-assistant-4",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -371,7 +358,6 @@
|
||||
"content": "<searchResults>\n <item title=\"Weather Portal\" url=\"https://weather3.example.com/\">Weather data...</item>\n</searchResults>",
|
||||
"createdAt": 1704067243000,
|
||||
"id": "msg-tool-5",
|
||||
"meta": {},
|
||||
"parentId": "msg-assistant-6",
|
||||
"plugin": {
|
||||
"apiName": "search",
|
||||
@@ -395,7 +381,6 @@
|
||||
"content": "杭州和北京天气如何",
|
||||
"createdAt": 1704067200000,
|
||||
"id": "msg-user-1",
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 2
|
||||
},
|
||||
|
||||
@@ -110,8 +110,7 @@
|
||||
"content": "What's your favorite programming paradigm?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-302",
|
||||
@@ -120,7 +119,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 15,
|
||||
@@ -139,7 +137,6 @@
|
||||
"parentId": "msg-302",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -151,7 +148,6 @@
|
||||
"parentId": "msg-305",
|
||||
"createdAt": 1704067212100,
|
||||
"updatedAt": 1704067212100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 22,
|
||||
@@ -169,8 +165,7 @@
|
||||
"content": "What are some benefits of immutability?",
|
||||
"parentId": "msg-307",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-311",
|
||||
@@ -179,7 +174,6 @@
|
||||
"parentId": "msg-310",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 55,
|
||||
"totalOutputTokens": 16,
|
||||
@@ -198,7 +192,6 @@
|
||||
"parentId": "msg-311",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -210,7 +203,6 @@
|
||||
"parentId": "msg-314",
|
||||
"createdAt": 1704067232100,
|
||||
"updatedAt": 1704067232100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 75,
|
||||
"totalOutputTokens": 42,
|
||||
@@ -230,8 +222,7 @@
|
||||
"content": "What's your favorite programming paradigm?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-302": {
|
||||
"id": "msg-302",
|
||||
@@ -240,7 +231,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202000,
|
||||
"updatedAt": 1704067202000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 15,
|
||||
@@ -255,7 +245,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202100,
|
||||
"updatedAt": 1704067202100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 12,
|
||||
@@ -270,7 +259,6 @@
|
||||
"parentId": "msg-301",
|
||||
"createdAt": 1704067202200,
|
||||
"updatedAt": 1704067202200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 10,
|
||||
"totalOutputTokens": 13,
|
||||
@@ -285,7 +273,6 @@
|
||||
"parentId": "msg-302",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -297,7 +284,6 @@
|
||||
"parentId": "msg-305",
|
||||
"createdAt": 1704067212000,
|
||||
"updatedAt": 1704067212000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 18,
|
||||
@@ -312,7 +298,6 @@
|
||||
"parentId": "msg-305",
|
||||
"createdAt": 1704067212100,
|
||||
"updatedAt": 1704067212100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 30,
|
||||
"totalOutputTokens": 22,
|
||||
@@ -326,8 +311,7 @@
|
||||
"content": "What are some benefits of immutability?",
|
||||
"parentId": "msg-307",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
"msg-311": {
|
||||
"id": "msg-311",
|
||||
@@ -336,7 +320,6 @@
|
||||
"parentId": "msg-310",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 55,
|
||||
"totalOutputTokens": 16,
|
||||
@@ -351,7 +334,6 @@
|
||||
"parentId": "msg-310",
|
||||
"createdAt": 1704067222100,
|
||||
"updatedAt": 1704067222100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 55,
|
||||
"totalOutputTokens": 14,
|
||||
@@ -366,7 +348,6 @@
|
||||
"parentId": "msg-311",
|
||||
"createdAt": 1704067230000,
|
||||
"updatedAt": 1704067230000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"activeBranchIndex": 1
|
||||
}
|
||||
@@ -378,7 +359,6 @@
|
||||
"parentId": "msg-314",
|
||||
"createdAt": 1704067232000,
|
||||
"updatedAt": 1704067232000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 75,
|
||||
"totalOutputTokens": 35,
|
||||
@@ -393,7 +373,6 @@
|
||||
"parentId": "msg-314",
|
||||
"createdAt": 1704067232100,
|
||||
"updatedAt": 1704067232100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 75,
|
||||
"totalOutputTokens": 42,
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"compare": true
|
||||
}
|
||||
@@ -59,7 +58,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 145,
|
||||
@@ -82,7 +80,6 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 158,
|
||||
@@ -103,7 +100,6 @@
|
||||
"parentMessageId": "msg-601"
|
||||
},
|
||||
"id": "compare-msg-601-msg-602-msg-603",
|
||||
"meta": {},
|
||||
"role": "compare",
|
||||
"updatedAt": 1704067205100
|
||||
},
|
||||
@@ -113,8 +109,7 @@
|
||||
"content": "What about performance differences?",
|
||||
"parentId": "msg-603",
|
||||
"createdAt": 1704067215000,
|
||||
"updatedAt": 1704067215000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067215000
|
||||
},
|
||||
{
|
||||
"id": "msg-605",
|
||||
@@ -123,7 +118,6 @@
|
||||
"parentId": "msg-604",
|
||||
"createdAt": 1704067217000,
|
||||
"updatedAt": 1704067217000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 182,
|
||||
"totalOutputTokens": 167,
|
||||
@@ -144,7 +138,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"compare": true
|
||||
}
|
||||
@@ -158,7 +151,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 145,
|
||||
@@ -179,7 +171,6 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 12,
|
||||
"totalOutputTokens": 158,
|
||||
@@ -198,8 +189,7 @@
|
||||
"content": "What about performance differences?",
|
||||
"parentId": "msg-603",
|
||||
"createdAt": 1704067215000,
|
||||
"updatedAt": 1704067215000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067215000
|
||||
},
|
||||
"msg-605": {
|
||||
"id": "msg-605",
|
||||
@@ -208,7 +198,6 @@
|
||||
"parentId": "msg-604",
|
||||
"createdAt": 1704067217000,
|
||||
"updatedAt": 1704067217000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 182,
|
||||
"totalOutputTokens": 167,
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"compare": true
|
||||
}
|
||||
@@ -76,7 +75,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 198,
|
||||
@@ -99,7 +97,6 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 215,
|
||||
@@ -123,7 +120,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205200,
|
||||
"updatedAt": 1704067205200,
|
||||
"meta": {},
|
||||
"children": [
|
||||
{
|
||||
"content": "Let me run a benchmark test to compare these two sorting algorithms with real data.",
|
||||
@@ -213,7 +209,6 @@
|
||||
"parentMessageId": "msg-301"
|
||||
},
|
||||
"id": "compare-msg-301-msg-302-msg-303-msg-304",
|
||||
"meta": {},
|
||||
"role": "compare",
|
||||
"updatedAt": 1704067205200
|
||||
},
|
||||
@@ -223,8 +218,7 @@
|
||||
"content": "Great analysis! Can you explain why QuickSort has better cache locality?",
|
||||
"parentId": "msg-303",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
{
|
||||
"id": "msg-309",
|
||||
@@ -233,7 +227,6 @@
|
||||
"parentId": "msg-308",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 268,
|
||||
"totalOutputTokens": 176,
|
||||
@@ -254,7 +247,6 @@
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"compare": true
|
||||
}
|
||||
@@ -268,7 +260,6 @@
|
||||
"provider": "openai",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 198,
|
||||
@@ -289,7 +280,6 @@
|
||||
"provider": "anthropic",
|
||||
"createdAt": 1704067205100,
|
||||
"updatedAt": 1704067205100,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 215,
|
||||
@@ -327,7 +317,6 @@
|
||||
],
|
||||
"createdAt": 1704067205200,
|
||||
"updatedAt": 1704067205200,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 38,
|
||||
@@ -350,8 +339,7 @@
|
||||
},
|
||||
"parentId": "msg-304",
|
||||
"createdAt": 1704067207540,
|
||||
"updatedAt": 1704067207540,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067207540
|
||||
},
|
||||
"msg-306": {
|
||||
"id": "msg-306",
|
||||
@@ -364,8 +352,7 @@
|
||||
},
|
||||
"parentId": "msg-304",
|
||||
"createdAt": 1704067207552,
|
||||
"updatedAt": 1704067207552,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067207552
|
||||
},
|
||||
"msg-307": {
|
||||
"id": "msg-307",
|
||||
@@ -374,7 +361,6 @@
|
||||
"parentId": "msg-306",
|
||||
"createdAt": 1704067208000,
|
||||
"updatedAt": 1704067208000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 156,
|
||||
"totalOutputTokens": 134,
|
||||
@@ -392,8 +378,7 @@
|
||||
"content": "Great analysis! Can you explain why QuickSort has better cache locality?",
|
||||
"parentId": "msg-303",
|
||||
"createdAt": 1704067220000,
|
||||
"updatedAt": 1704067220000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067220000
|
||||
},
|
||||
"msg-309": {
|
||||
"id": "msg-309",
|
||||
@@ -402,7 +387,6 @@
|
||||
"parentId": "msg-308",
|
||||
"createdAt": 1704067222000,
|
||||
"updatedAt": 1704067222000,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"totalInputTokens": 268,
|
||||
"totalOutputTokens": 176,
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
"content": "Can you help me write a Python function to check if a number is prime?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
{
|
||||
"id": "msg-002",
|
||||
@@ -34,7 +33,6 @@
|
||||
"parentId": "msg-001",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 156,
|
||||
@@ -54,8 +52,7 @@
|
||||
"content": "Thanks! Can you add some test cases?",
|
||||
"parentId": "msg-002",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
{
|
||||
"id": "msg-004",
|
||||
@@ -64,7 +61,6 @@
|
||||
"parentId": "msg-003",
|
||||
"createdAt": 1704067213000,
|
||||
"updatedAt": 1704067213000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 180,
|
||||
"totalOutputTokens": 89,
|
||||
@@ -83,8 +79,7 @@
|
||||
"content": "Can you help me write a Python function to check if a number is prime?",
|
||||
"parentId": null,
|
||||
"createdAt": 1704067200000,
|
||||
"updatedAt": 1704067200000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067200000
|
||||
},
|
||||
"msg-002": {
|
||||
"id": "msg-002",
|
||||
@@ -93,7 +88,6 @@
|
||||
"parentId": "msg-001",
|
||||
"createdAt": 1704067205000,
|
||||
"updatedAt": 1704067205000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 24,
|
||||
"totalOutputTokens": 156,
|
||||
@@ -113,8 +107,7 @@
|
||||
"content": "Thanks! Can you add some test cases?",
|
||||
"parentId": "msg-002",
|
||||
"createdAt": 1704067210000,
|
||||
"updatedAt": 1704067210000,
|
||||
"meta": {}
|
||||
"updatedAt": 1704067210000
|
||||
},
|
||||
"msg-004": {
|
||||
"id": "msg-004",
|
||||
@@ -123,7 +116,6 @@
|
||||
"parentId": "msg-003",
|
||||
"createdAt": 1704067213000,
|
||||
"updatedAt": 1704067213000,
|
||||
"meta": {},
|
||||
"usage": {
|
||||
"totalInputTokens": 180,
|
||||
"totalOutputTokens": 89,
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
"content": "Help me create two tasks to research the weather in Hangzhou and Beijing tomorrow.",
|
||||
"parentId": null,
|
||||
"createdAt": 1735526559382,
|
||||
"updatedAt": 1735526559382,
|
||||
"meta": {}
|
||||
"updatedAt": 1735526559382
|
||||
},
|
||||
{
|
||||
"id": "msg-assistant-1",
|
||||
@@ -52,7 +51,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1735526560163,
|
||||
"updatedAt": 1735526585550,
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"children": [
|
||||
@@ -121,7 +119,6 @@
|
||||
"parentMessageId": "msg-tool-1"
|
||||
},
|
||||
"id": "tasks-msg-tool-1-msg-task-hangzhou-msg-task-beijing",
|
||||
"meta": {},
|
||||
"role": "tasks",
|
||||
"tasks": [
|
||||
{
|
||||
@@ -131,7 +128,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526756262,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"instruction": "Search for Hangzhou weather tomorrow."
|
||||
},
|
||||
@@ -153,7 +149,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526595647,
|
||||
"updatedAt": 1735526792430,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"instruction": "Search for Beijing weather tomorrow."
|
||||
},
|
||||
@@ -178,7 +173,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526795651,
|
||||
"updatedAt": 1735526813171,
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"metadata": {
|
||||
@@ -200,8 +194,7 @@
|
||||
"content": "Help me create two tasks to research the weather in Hangzhou and Beijing tomorrow.",
|
||||
"parentId": null,
|
||||
"createdAt": 1735526559382,
|
||||
"updatedAt": 1735526559382,
|
||||
"meta": {}
|
||||
"updatedAt": 1735526559382
|
||||
},
|
||||
"msg-assistant-1": {
|
||||
"id": "msg-assistant-1",
|
||||
@@ -210,7 +203,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1735526560163,
|
||||
"updatedAt": 1735526585550,
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"tools": [
|
||||
@@ -241,7 +233,6 @@
|
||||
"tool_call_id": "call_exec_tasks_1",
|
||||
"createdAt": 1735526588116,
|
||||
"updatedAt": 1735526591337,
|
||||
"meta": {},
|
||||
"plugin": {
|
||||
"apiName": "execTasks",
|
||||
"arguments": "{\"tasks\": [{\"description\": \"Research Hangzhou weather\", \"instruction\": \"Search for Hangzhou weather tomorrow.\"}, {\"description\": \"Research Beijing weather\", \"instruction\": \"Search for Beijing weather tomorrow.\"}]}",
|
||||
@@ -270,7 +261,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526756262,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"instruction": "Search for Hangzhou weather tomorrow."
|
||||
},
|
||||
@@ -292,7 +282,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526595647,
|
||||
"updatedAt": 1735526792430,
|
||||
"meta": {},
|
||||
"metadata": {
|
||||
"instruction": "Search for Beijing weather tomorrow."
|
||||
},
|
||||
@@ -314,7 +303,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526795651,
|
||||
"updatedAt": 1735526813171,
|
||||
"meta": {},
|
||||
"model": "deepseek-chat",
|
||||
"provider": "deepseek",
|
||||
"metadata": {
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
"content": "Create three parallel tasks to research AI topics.",
|
||||
"parentId": null,
|
||||
"createdAt": 1735526559382,
|
||||
"updatedAt": 1735526559382,
|
||||
"meta": {}
|
||||
"updatedAt": 1735526559382
|
||||
},
|
||||
{
|
||||
"id": "msg-assistant-1",
|
||||
@@ -56,7 +55,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1735526560163,
|
||||
"updatedAt": 1735526585550,
|
||||
"meta": {},
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"children": [
|
||||
@@ -76,9 +74,15 @@
|
||||
"state": {
|
||||
"type": "execTasks",
|
||||
"tasks": [
|
||||
{ "description": "Research LLM architectures" },
|
||||
{ "description": "Research AI agents" },
|
||||
{ "description": "Research RAG systems" }
|
||||
{
|
||||
"description": "Research LLM architectures"
|
||||
},
|
||||
{
|
||||
"description": "Research AI agents"
|
||||
},
|
||||
{
|
||||
"description": "Research RAG systems"
|
||||
}
|
||||
],
|
||||
"parentMessageId": "msg-tool-1"
|
||||
}
|
||||
@@ -95,7 +99,6 @@
|
||||
"content": "",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526800000,
|
||||
"meta": {},
|
||||
"extra": {
|
||||
"parentMessageId": "msg-tool-1"
|
||||
},
|
||||
@@ -107,7 +110,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526756262,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 120000,
|
||||
"status": "completed",
|
||||
@@ -125,7 +127,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526595647,
|
||||
"updatedAt": 1735526792430,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 150000,
|
||||
"status": "completed",
|
||||
@@ -143,7 +144,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526596000,
|
||||
"updatedAt": 1735526800000,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 130000,
|
||||
"status": "completed",
|
||||
@@ -163,7 +163,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526810000,
|
||||
"updatedAt": 1735526820000,
|
||||
"meta": {},
|
||||
"model": "gpt-4",
|
||||
"provider": "openai"
|
||||
}
|
||||
@@ -175,8 +174,7 @@
|
||||
"content": "Create three parallel tasks to research AI topics.",
|
||||
"parentId": null,
|
||||
"createdAt": 1735526559382,
|
||||
"updatedAt": 1735526559382,
|
||||
"meta": {}
|
||||
"updatedAt": 1735526559382
|
||||
},
|
||||
"msg-assistant-1": {
|
||||
"id": "msg-assistant-1",
|
||||
@@ -185,7 +183,6 @@
|
||||
"parentId": "msg-user-1",
|
||||
"createdAt": 1735526560163,
|
||||
"updatedAt": 1735526585550,
|
||||
"meta": {},
|
||||
"model": "gpt-4",
|
||||
"provider": "openai",
|
||||
"tools": [
|
||||
@@ -206,13 +203,18 @@
|
||||
"tool_call_id": "call_exec_tasks_1",
|
||||
"createdAt": 1735526588116,
|
||||
"updatedAt": 1735526591337,
|
||||
"meta": {},
|
||||
"pluginState": {
|
||||
"type": "execTasks",
|
||||
"tasks": [
|
||||
{ "description": "Research LLM architectures" },
|
||||
{ "description": "Research AI agents" },
|
||||
{ "description": "Research RAG systems" }
|
||||
{
|
||||
"description": "Research LLM architectures"
|
||||
},
|
||||
{
|
||||
"description": "Research AI agents"
|
||||
},
|
||||
{
|
||||
"description": "Research RAG systems"
|
||||
}
|
||||
],
|
||||
"parentMessageId": "msg-tool-1"
|
||||
}
|
||||
@@ -224,7 +226,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526594643,
|
||||
"updatedAt": 1735526756262,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 120000,
|
||||
"status": "completed",
|
||||
@@ -242,7 +243,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526595647,
|
||||
"updatedAt": 1735526792430,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 150000,
|
||||
"status": "completed",
|
||||
@@ -260,7 +260,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526596000,
|
||||
"updatedAt": 1735526800000,
|
||||
"meta": {},
|
||||
"taskDetail": {
|
||||
"duration": 130000,
|
||||
"status": "completed",
|
||||
@@ -278,7 +277,6 @@
|
||||
"parentId": "msg-tool-1",
|
||||
"createdAt": 1735526810000,
|
||||
"updatedAt": 1735526820000,
|
||||
"meta": {},
|
||||
"model": "gpt-4",
|
||||
"provider": "openai"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -19,7 +18,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Hi there',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -45,7 +43,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Single message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -65,7 +62,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -73,7 +69,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Child 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -82,7 +77,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Child 2',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 3000,
|
||||
@@ -101,7 +95,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Root 1',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -109,7 +102,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Root 2',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 2000,
|
||||
},
|
||||
@@ -126,7 +118,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Level 0',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -134,7 +125,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Level 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -143,7 +133,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Level 2',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
@@ -152,7 +141,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Level 3',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-3',
|
||||
role: 'assistant',
|
||||
updatedAt: 4000,
|
||||
@@ -173,7 +161,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -181,7 +168,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -190,7 +176,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Branch 2',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 3000,
|
||||
@@ -199,7 +184,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Sub-branch 1',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 4000,
|
||||
@@ -208,7 +192,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Sub-branch 2',
|
||||
createdAt: 5000,
|
||||
id: 'msg-5',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 5000,
|
||||
@@ -230,7 +213,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Main message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -238,7 +220,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Thread message 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
threadId: 'thread-1',
|
||||
@@ -248,7 +229,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Thread message 2',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
threadId: 'thread-1',
|
||||
@@ -269,7 +249,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Thread 1 - msg 1',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
threadId: 'thread-1',
|
||||
updatedAt: 1000,
|
||||
@@ -278,7 +257,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Thread 1 - msg 2',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
threadId: 'thread-1',
|
||||
updatedAt: 2000,
|
||||
@@ -287,7 +265,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Thread 2 - msg 1',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
threadId: 'thread-2',
|
||||
updatedAt: 3000,
|
||||
@@ -307,7 +284,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'No thread',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -315,7 +291,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'With thread',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
threadId: 'thread-1',
|
||||
updatedAt: 2000,
|
||||
@@ -334,7 +309,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Message 1',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -342,7 +316,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Message 2',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
},
|
||||
@@ -361,7 +334,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -391,7 +363,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -408,7 +379,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -427,7 +397,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Root message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -436,7 +405,6 @@ describe('buildHelperMaps', () => {
|
||||
createdAt: 2000,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -445,7 +413,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Thread message',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
threadId: 'thread-1',
|
||||
@@ -455,7 +422,6 @@ describe('buildHelperMaps', () => {
|
||||
content: 'Branch message',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 4000,
|
||||
@@ -493,7 +459,6 @@ describe('buildHelperMaps', () => {
|
||||
content: `Message ${i}`,
|
||||
createdAt: i,
|
||||
id: `msg-${i}`,
|
||||
meta: {},
|
||||
parentId: i > 0 ? `msg-${i - 1}` : undefined,
|
||||
role: i % 2 === 0 ? ('user' as const) : ('assistant' as const),
|
||||
updatedAt: i,
|
||||
|
||||
@@ -12,7 +12,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -34,7 +33,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Message 1',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -42,7 +40,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Message 2',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -51,7 +48,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Message 3',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
@@ -75,7 +71,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root 1',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -83,7 +78,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root 2',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 2000,
|
||||
},
|
||||
@@ -105,7 +99,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -113,7 +106,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -122,7 +114,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch 2',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 3000,
|
||||
@@ -145,7 +136,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -153,7 +143,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -162,7 +151,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch 1.1',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
@@ -171,7 +159,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch 1.2',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 4000,
|
||||
@@ -194,7 +181,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Level 0',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -202,7 +188,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Level 1',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -211,7 +196,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Level 2',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
@@ -220,7 +204,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Level 3',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-3',
|
||||
role: 'assistant',
|
||||
updatedAt: 4000,
|
||||
@@ -254,7 +237,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -262,7 +244,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Main flow',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -271,7 +252,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Thread message',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
threadId: 'thread-1',
|
||||
@@ -294,7 +274,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Main root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -302,7 +281,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Thread root',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
threadId: 'thread-1',
|
||||
updatedAt: 2000,
|
||||
@@ -322,7 +300,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -330,7 +307,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Main child',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -339,7 +315,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Main grandchild',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
@@ -348,7 +323,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Thread grandchild',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
threadId: 'thread-1',
|
||||
@@ -380,7 +354,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Lone message',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -402,7 +375,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Orphan',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
parentId: 'non-existent',
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
@@ -422,7 +394,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Thread 1',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
threadId: 'thread-1',
|
||||
updatedAt: 1000,
|
||||
@@ -431,7 +402,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Thread 2',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
threadId: 'thread-1',
|
||||
updatedAt: 2000,
|
||||
@@ -452,7 +422,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -460,7 +429,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch A',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -469,7 +437,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch A -> Child',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
@@ -478,7 +445,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch B',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 4000,
|
||||
@@ -487,7 +453,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch B -> Child 1',
|
||||
createdAt: 5000,
|
||||
id: 'msg-5',
|
||||
meta: {},
|
||||
parentId: 'msg-4',
|
||||
role: 'user',
|
||||
updatedAt: 5000,
|
||||
@@ -496,7 +461,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Branch B -> Child 2',
|
||||
createdAt: 6000,
|
||||
id: 'msg-6',
|
||||
meta: {},
|
||||
parentId: 'msg-4',
|
||||
role: 'user',
|
||||
updatedAt: 6000,
|
||||
@@ -529,7 +493,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Tree 1 Root',
|
||||
createdAt: 1000,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 1000,
|
||||
},
|
||||
@@ -537,7 +500,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Tree 1 Child',
|
||||
createdAt: 2000,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 2000,
|
||||
@@ -547,7 +509,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Tree 2 Root',
|
||||
createdAt: 3000,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 3000,
|
||||
},
|
||||
@@ -555,7 +516,6 @@ describe('buildIdTree', () => {
|
||||
content: 'Tree 2 Child',
|
||||
createdAt: 4000,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-3',
|
||||
role: 'assistant',
|
||||
updatedAt: 4000,
|
||||
@@ -579,7 +539,6 @@ describe('buildIdTree', () => {
|
||||
content: `Message ${i}`,
|
||||
createdAt: i,
|
||||
id: `msg-${i}`,
|
||||
meta: {},
|
||||
parentId: i > 0 ? `msg-${i - 1}` : undefined,
|
||||
role: i % 2 === 0 ? ('user' as const) : ('assistant' as const),
|
||||
updatedAt: i,
|
||||
|
||||
@@ -497,7 +497,6 @@ export class FlatListBuilder {
|
||||
parentMessageId: parentMessage.id,
|
||||
},
|
||||
id: compareId,
|
||||
meta: parentMessage.meta || {},
|
||||
role: 'compare' as any,
|
||||
updatedAt,
|
||||
} as Message;
|
||||
@@ -585,7 +584,6 @@ export class FlatListBuilder {
|
||||
id: agentCouncilId,
|
||||
// members is a flat array of messages (not nested arrays)
|
||||
members: members as any,
|
||||
meta: parentMessage.meta || {},
|
||||
role: 'agentCouncil' as any,
|
||||
updatedAt,
|
||||
} as Message;
|
||||
@@ -611,7 +609,6 @@ export class FlatListBuilder {
|
||||
parentMessageId: group.parentMessageId,
|
||||
},
|
||||
id: group.id,
|
||||
meta: members[0]?.meta || {},
|
||||
role: 'compare' as any,
|
||||
updatedAt: Math.max(...members.map((m) => m.updatedAt)),
|
||||
} as Message;
|
||||
@@ -925,7 +922,6 @@ export class FlatListBuilder {
|
||||
parentMessageId: parentMessage.id,
|
||||
},
|
||||
id: tasksId,
|
||||
meta: parentMessage.meta || {},
|
||||
role: 'tasks' as any,
|
||||
tasks: taskMessages as any,
|
||||
updatedAt,
|
||||
|
||||
@@ -12,7 +12,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 1 },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -34,7 +33,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
};
|
||||
@@ -55,7 +53,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
};
|
||||
@@ -76,7 +73,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 2 }, // index = children.length (optimistic update)
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -100,7 +96,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 5 }, // > children.length (invalid)
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -125,7 +120,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 1 },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -142,7 +136,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
};
|
||||
@@ -161,7 +154,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
};
|
||||
@@ -177,7 +169,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 2 }, // index = childIds.length (optimistic update)
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -198,7 +189,6 @@ describe('BranchResolver', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 5 }, // > childIds.length (invalid)
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
|
||||
@@ -35,7 +35,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -46,7 +45,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Hi',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -76,7 +74,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 0 },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -88,7 +85,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Response 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -99,7 +95,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Response 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -137,7 +132,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Assistant with tools',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
tools: [
|
||||
{
|
||||
@@ -157,7 +151,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Tool result',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
role: 'tool',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -191,7 +184,6 @@ describe('ContextTreeBuilder', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeColumn: true },
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -204,7 +196,6 @@ describe('ContextTreeBuilder', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -237,7 +228,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'User message',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { compare: true },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -249,7 +239,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Assistant 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
metadata: { activeColumn: true },
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -261,7 +250,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Assistant 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -319,7 +307,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
// activeBranchIndex = 2 means optimistic update (pointing to not-yet-created branch)
|
||||
metadata: { activeBranchIndex: 2 },
|
||||
role: 'user',
|
||||
@@ -332,7 +319,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Response 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -343,7 +329,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Response 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -383,7 +368,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { compare: true },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -395,7 +379,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Assistant 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
metadata: { activeColumn: true },
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -407,7 +390,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Assistant 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -418,7 +400,6 @@ describe('ContextTreeBuilder', () => {
|
||||
content: 'Follow-up',
|
||||
createdAt: 0,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
|
||||
@@ -45,7 +45,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -53,7 +52,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Hi',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -74,7 +72,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Request',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -82,7 +79,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Using tool',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
metadata: { totalInputTokens: 10, totalOutputTokens: 20 },
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
@@ -95,7 +91,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Tool result',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-1',
|
||||
@@ -119,7 +114,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 0 },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -128,7 +122,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -137,7 +130,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -158,7 +150,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -166,7 +157,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Assistant',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 1 },
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
@@ -176,7 +166,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -185,7 +174,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -208,7 +196,6 @@ describe('FlatListBuilder', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeColumn: true },
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -218,7 +205,6 @@ describe('FlatListBuilder', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -244,7 +230,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { compare: true },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -253,7 +238,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Assistant 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
metadata: { activeColumn: true },
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
@@ -263,7 +247,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Assistant 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -292,7 +275,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { activeBranchIndex: 0 },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -301,7 +283,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -310,7 +291,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -319,7 +299,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Follow-up',
|
||||
createdAt: 0,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -341,7 +320,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: { compare: true },
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -350,7 +328,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Assistant 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
tools: [
|
||||
@@ -362,7 +339,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Tool result',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-1',
|
||||
@@ -372,7 +348,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Assistant 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -399,7 +374,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User request',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -407,7 +381,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Using tool',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
tools: [
|
||||
@@ -419,7 +392,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Tool result',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-1',
|
||||
@@ -429,7 +401,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Response based on tool',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'tool-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -438,7 +409,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User follow-up',
|
||||
createdAt: 0,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-3',
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -461,7 +431,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User request',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -469,7 +438,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Using tool',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
tools: [
|
||||
@@ -481,7 +449,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Tool result',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
parentId: 'msg-2',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-1',
|
||||
@@ -491,7 +458,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User reply to tool',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'tool-1',
|
||||
role: 'user',
|
||||
updatedAt: 0,
|
||||
@@ -516,7 +482,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'User',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
// activeBranchIndex = 2 means pointing to a not-yet-created branch (optimistic update)
|
||||
// when there are only 2 existing children (msg-2, msg-3)
|
||||
metadata: { activeBranchIndex: 2 },
|
||||
@@ -527,7 +492,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
@@ -536,7 +500,6 @@ describe('FlatListBuilder', () => {
|
||||
content: 'Branch 2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
|
||||
@@ -16,7 +16,6 @@ describe('MessageCollector', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -25,7 +24,6 @@ describe('MessageCollector', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-1',
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -34,7 +32,6 @@ describe('MessageCollector', () => {
|
||||
createdAt: 0,
|
||||
groupId: 'group-2',
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -57,7 +54,6 @@ describe('MessageCollector', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
tools: [
|
||||
{ apiName: 'tool1', arguments: '{}', id: 'tool-1', identifier: 'test', type: 'default' },
|
||||
@@ -71,7 +67,6 @@ describe('MessageCollector', () => {
|
||||
content: 'result1',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-1',
|
||||
@@ -81,7 +76,6 @@ describe('MessageCollector', () => {
|
||||
content: 'result2',
|
||||
createdAt: 0,
|
||||
id: 'msg-3',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-2',
|
||||
@@ -91,7 +85,6 @@ describe('MessageCollector', () => {
|
||||
content: 'other',
|
||||
createdAt: 0,
|
||||
id: 'msg-4',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'tool',
|
||||
tool_call_id: 'tool-3',
|
||||
@@ -130,7 +123,6 @@ describe('MessageCollector', () => {
|
||||
content: 'test',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -141,7 +133,6 @@ describe('MessageCollector', () => {
|
||||
content: 'result',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'tool',
|
||||
updatedAt: 0,
|
||||
@@ -169,7 +160,6 @@ describe('MessageCollector', () => {
|
||||
content: 'test1',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
},
|
||||
@@ -180,7 +170,6 @@ describe('MessageCollector', () => {
|
||||
content: 'result1',
|
||||
createdAt: 0,
|
||||
id: 'tool-1',
|
||||
meta: {},
|
||||
parentId: 'msg-1',
|
||||
role: 'tool',
|
||||
updatedAt: 0,
|
||||
@@ -192,7 +181,6 @@ describe('MessageCollector', () => {
|
||||
content: 'test2',
|
||||
createdAt: 0,
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
parentId: 'tool-1',
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
|
||||
@@ -13,7 +13,6 @@ describe('MessageTransformer', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
metadata: {
|
||||
cost: 0.001,
|
||||
duration: 1000,
|
||||
@@ -53,7 +52,6 @@ describe('MessageTransformer', () => {
|
||||
content: 'Hello',
|
||||
createdAt: 0,
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: 0,
|
||||
};
|
||||
|
||||
@@ -485,7 +485,6 @@ export class MessageModel {
|
||||
.filter((relation) => relation.messageId === item.id)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
.map<ChatImageItem>(({ id, url, name }) => ({ alt: name!, id, url })),
|
||||
meta: {},
|
||||
|
||||
model,
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ const createMessage = (
|
||||
id: overrides.id ?? `msg-${++messageCounter}`,
|
||||
createdAt: overrides.createdAt ?? 0,
|
||||
updatedAt: overrides.updatedAt ?? 0,
|
||||
meta: overrides.meta ?? {},
|
||||
...overrides,
|
||||
});
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ exports[`filterMessagesForAgent > should handle assistant direct messages 1`] =
|
||||
"content": "DM to agent-1",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "agent-1",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -50,7 +49,6 @@ exports[`filterMessagesForAgent > should handle assistant direct messages 1`] =
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "2",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "agent-2",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -64,7 +62,6 @@ exports[`filterMessagesForAgent > should handle group messages without targetId
|
||||
"content": "Hello everyone",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -73,7 +70,6 @@ exports[`filterMessagesForAgent > should handle group messages without targetId
|
||||
"content": "Hi there",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "2",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -87,7 +83,6 @@ exports[`filterMessagesForAgent > should handle messages sent by this agent 1`]
|
||||
"content": "My message to agent-2",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "agent-2",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -97,7 +92,6 @@ exports[`filterMessagesForAgent > should handle messages sent by this agent 1`]
|
||||
"content": "My group message",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "2",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -106,7 +100,6 @@ exports[`filterMessagesForAgent > should handle messages sent by this agent 1`]
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "agent-3",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -120,7 +113,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "System prompt",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "system",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -128,7 +120,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "Hello everyone",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "2",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -137,7 +128,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "Hi!",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -145,7 +135,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "DM to agent-1",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "4",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"targetId": "agent-1",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -155,7 +144,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "DM response",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "5",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "user",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -164,7 +152,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "6",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"targetId": "agent-2",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -174,7 +161,6 @@ exports[`filterMessagesForAgent > should handle mixed message types 1`] = `
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "7",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "user",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -188,7 +174,6 @@ exports[`filterMessagesForAgent > should handle system messages 1`] = `
|
||||
"content": "System message",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "system",
|
||||
"updatedAt": 1634567890000,
|
||||
},
|
||||
@@ -201,7 +186,6 @@ exports[`filterMessagesForAgent > should handle user direct messages 1`] = `
|
||||
"content": "Private message to agent-1",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"targetId": "agent-1",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -210,7 +194,6 @@ exports[`filterMessagesForAgent > should handle user direct messages 1`] = `
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "2",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"targetId": "agent-2",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -227,7 +210,6 @@ exports[`filterMessagesForAgent > should preserve all message properties when re
|
||||
"file1",
|
||||
],
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"observationId": "obs1",
|
||||
"parentId": "parent1",
|
||||
"role": "user",
|
||||
@@ -244,7 +226,6 @@ exports[`filterMessagesForAgent > should replace content for DMs not involving t
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"role": "user",
|
||||
"targetId": "agent-2",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -254,7 +235,6 @@ exports[`filterMessagesForAgent > should replace content for DMs not involving t
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "2",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "user",
|
||||
"updatedAt": 1634567890000,
|
||||
@@ -264,7 +244,6 @@ exports[`filterMessagesForAgent > should replace content for DMs not involving t
|
||||
"content": "***",
|
||||
"createdAt": 1634567890000,
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"role": "assistant",
|
||||
"targetId": "agent-3",
|
||||
"updatedAt": 1634567890000,
|
||||
|
||||
@@ -19,7 +19,6 @@ describe('buildGroupChatSystemPrompt', () => {
|
||||
content: 'Hello everyone',
|
||||
createdAt: mockTimestamp,
|
||||
updatedAt: mockTimestamp,
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'm2',
|
||||
@@ -28,7 +27,6 @@ describe('buildGroupChatSystemPrompt', () => {
|
||||
content: 'Hi! I can help with that.',
|
||||
createdAt: mockTimestamp,
|
||||
updatedAt: mockTimestamp,
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -114,7 +112,6 @@ describe('filterMessagesForAgent', () => {
|
||||
content,
|
||||
createdAt: mockTimestamp,
|
||||
updatedAt: mockTimestamp,
|
||||
meta: {},
|
||||
...options,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { MetaData } from '../../meta';
|
||||
import { GroundingSearch } from '../../search';
|
||||
import { ThreadStatus } from '../../topic/thread';
|
||||
import {
|
||||
@@ -121,7 +120,6 @@ export interface UIChatMessage {
|
||||
id: string;
|
||||
imageList?: ChatImageItem[];
|
||||
members?: UIChatMessage[];
|
||||
meta: MetaData;
|
||||
metadata?: MessageMetadata | null;
|
||||
model?: string | null;
|
||||
/**
|
||||
|
||||
@@ -187,7 +187,6 @@ describe('DataSlice', () => {
|
||||
role: 'user',
|
||||
createdAt: 1000,
|
||||
updatedAt: 1000,
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'new-msg-2',
|
||||
@@ -195,7 +194,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 2000,
|
||||
updatedAt: 2000,
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -329,7 +327,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistantGroup' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
children: [
|
||||
{ id: 'child-1', content: 'First response', role: 'assistant' as const },
|
||||
{ id: 'child-2', content: 'Second response', role: 'assistant' as const },
|
||||
@@ -352,7 +349,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistantGroup' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
children: [
|
||||
{ id: 'child-1', content: 'First response', role: 'assistant' as const },
|
||||
{
|
||||
@@ -387,7 +383,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistantGroup' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
children: [
|
||||
{ id: 'child-1', content: 'First response', role: 'assistant' as const },
|
||||
{ id: 'child-2', content: '', role: 'assistant' as const },
|
||||
@@ -409,7 +404,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistantGroup' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
children: [],
|
||||
};
|
||||
|
||||
@@ -434,7 +428,6 @@ describe('DataSlice', () => {
|
||||
role: 'user',
|
||||
createdAt: 1000,
|
||||
updatedAt: 1000,
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -468,7 +461,6 @@ describe('DataSlice', () => {
|
||||
role: 'user',
|
||||
createdAt: 1000,
|
||||
updatedAt: 1000,
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -575,7 +567,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 1000,
|
||||
updatedAt: 1000,
|
||||
meta: {},
|
||||
groupId: 'group-123',
|
||||
agentId: 'worker-agent-1',
|
||||
},
|
||||
@@ -585,7 +576,6 @@ describe('DataSlice', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 2000,
|
||||
updatedAt: 2000,
|
||||
meta: {},
|
||||
groupId: 'group-123',
|
||||
agentId: 'worker-agent-2',
|
||||
},
|
||||
@@ -629,7 +619,6 @@ describe('DataSlice', () => {
|
||||
role: 'user',
|
||||
createdAt: 1000,
|
||||
updatedAt: 1000,
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -670,7 +659,6 @@ describe('DataSlice', () => {
|
||||
content: 'test',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
} as any);
|
||||
@@ -700,7 +688,6 @@ describe('DataSlice', () => {
|
||||
content: 'test',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
} as any);
|
||||
@@ -730,7 +717,6 @@ describe('DataSlice', () => {
|
||||
content: 'test',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
} as any);
|
||||
|
||||
@@ -14,7 +14,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
role: 'user',
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'message2',
|
||||
@@ -22,7 +21,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: 1629264001000,
|
||||
updatedAt: 1629264001000,
|
||||
role: 'assistant',
|
||||
meta: {},
|
||||
tools: [
|
||||
{ identifier: 'tool1', apiName: 'calculator', id: 'abc', type: 'default', arguments: '' },
|
||||
],
|
||||
@@ -93,7 +91,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
role: 'user',
|
||||
meta: {},
|
||||
extra: { abc: '1' },
|
||||
} as UIChatMessage,
|
||||
];
|
||||
@@ -230,7 +227,6 @@ describe('messagesReducer', () => {
|
||||
content: 'Tool content',
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
meta: {},
|
||||
plugin: {
|
||||
identifier: 'tool1',
|
||||
apiName: 'calculator',
|
||||
@@ -327,7 +323,6 @@ describe('messagesReducer', () => {
|
||||
content: '',
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
meta: {},
|
||||
} as UIChatMessage,
|
||||
];
|
||||
|
||||
@@ -501,7 +496,6 @@ describe('messagesReducer', () => {
|
||||
expect(newMsg?.role).toBe('user');
|
||||
expect(newMsg?.createdAt).toBeDefined();
|
||||
expect(newMsg?.updatedAt).toBeDefined();
|
||||
expect(newMsg?.meta).toEqual({});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -565,7 +559,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 1,
|
||||
updatedAt: 1,
|
||||
meta: {},
|
||||
parentId: undefined,
|
||||
},
|
||||
{
|
||||
@@ -574,7 +567,6 @@ describe('messagesReducer', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 2,
|
||||
updatedAt: 2,
|
||||
meta: {},
|
||||
parentId: 'A',
|
||||
},
|
||||
{
|
||||
@@ -583,7 +575,6 @@ describe('messagesReducer', () => {
|
||||
role: 'tool',
|
||||
createdAt: 3,
|
||||
updatedAt: 3,
|
||||
meta: {},
|
||||
parentId: 'B',
|
||||
},
|
||||
{
|
||||
@@ -592,7 +583,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 4,
|
||||
updatedAt: 4,
|
||||
meta: {},
|
||||
parentId: 'C',
|
||||
},
|
||||
];
|
||||
@@ -624,7 +614,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 1,
|
||||
updatedAt: 1,
|
||||
meta: {},
|
||||
parentId: undefined,
|
||||
},
|
||||
{
|
||||
@@ -633,7 +622,6 @@ describe('messagesReducer', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 2,
|
||||
updatedAt: 2,
|
||||
meta: {},
|
||||
parentId: 'A',
|
||||
},
|
||||
{
|
||||
@@ -642,7 +630,6 @@ describe('messagesReducer', () => {
|
||||
role: 'tool',
|
||||
createdAt: 3,
|
||||
updatedAt: 3,
|
||||
meta: {},
|
||||
parentId: 'B',
|
||||
},
|
||||
{
|
||||
@@ -651,7 +638,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 4,
|
||||
updatedAt: 4,
|
||||
meta: {},
|
||||
parentId: 'C',
|
||||
},
|
||||
];
|
||||
@@ -681,7 +667,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 1,
|
||||
updatedAt: 1,
|
||||
meta: {},
|
||||
parentId: undefined,
|
||||
},
|
||||
{
|
||||
@@ -690,7 +675,6 @@ describe('messagesReducer', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 2,
|
||||
updatedAt: 2,
|
||||
meta: {},
|
||||
parentId: 'A',
|
||||
},
|
||||
{
|
||||
@@ -699,7 +683,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 3,
|
||||
updatedAt: 3,
|
||||
meta: {},
|
||||
parentId: 'B',
|
||||
},
|
||||
{
|
||||
@@ -708,7 +691,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 4,
|
||||
updatedAt: 4,
|
||||
meta: {},
|
||||
parentId: undefined,
|
||||
},
|
||||
{
|
||||
@@ -717,7 +699,6 @@ describe('messagesReducer', () => {
|
||||
role: 'assistant',
|
||||
createdAt: 5,
|
||||
updatedAt: 5,
|
||||
meta: {},
|
||||
parentId: 'X',
|
||||
},
|
||||
{
|
||||
@@ -726,7 +707,6 @@ describe('messagesReducer', () => {
|
||||
role: 'user',
|
||||
createdAt: 6,
|
||||
updatedAt: 6,
|
||||
meta: {},
|
||||
parentId: 'Y',
|
||||
},
|
||||
];
|
||||
@@ -761,7 +741,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ export const messagesReducer = (
|
||||
const now = Date.now();
|
||||
|
||||
return produce(state, (draft) => {
|
||||
draft.push({ ...value, createdAt: now, id, meta: {}, updatedAt: now } as UIChatMessage);
|
||||
draft.push({ ...value, createdAt: now, id, updatedAt: now } as UIChatMessage);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'user',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -138,7 +137,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'user' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
act(() => {
|
||||
@@ -173,7 +171,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'assistantGroup',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
children: [
|
||||
{
|
||||
id: 'child-1',
|
||||
@@ -223,7 +220,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'user' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
act(() => {
|
||||
@@ -246,7 +242,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'assistantGroup',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
children: [{ id: 'child-1', content: 'Response' }],
|
||||
};
|
||||
|
||||
@@ -290,7 +285,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'user' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
act(() => {
|
||||
@@ -340,7 +334,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'assistant' as const,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'assistant-2',
|
||||
@@ -348,7 +341,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'assistant' as const,
|
||||
createdAt: Date.now() + 1,
|
||||
updatedAt: Date.now() + 1,
|
||||
meta: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -492,7 +484,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'user',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -638,7 +629,6 @@ describe('Message CRUD Actions', () => {
|
||||
role: 'user',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -9,7 +9,6 @@ describe('serverMessagesEngine', () => {
|
||||
content: 'Hello',
|
||||
createdAt: Date.now(),
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: Date.now(),
|
||||
} as UIChatMessage,
|
||||
@@ -17,7 +16,6 @@ describe('serverMessagesEngine', () => {
|
||||
content: 'Hi there!',
|
||||
createdAt: Date.now(),
|
||||
id: 'msg-2',
|
||||
meta: {},
|
||||
role: 'assistant',
|
||||
updatedAt: Date.now(),
|
||||
} as UIChatMessage,
|
||||
@@ -78,7 +76,6 @@ describe('serverMessagesEngine', () => {
|
||||
content: `Message ${i}`,
|
||||
createdAt: Date.now(),
|
||||
id: `msg-${i}`,
|
||||
meta: {},
|
||||
role: i % 2 === 0 ? 'user' : 'assistant',
|
||||
updatedAt: Date.now(),
|
||||
} as UIChatMessage);
|
||||
@@ -260,7 +257,9 @@ describe('serverMessagesEngine', () => {
|
||||
|
||||
// User memories are injected as a consolidated user message before the first user message
|
||||
// Note: meta/id fields are removed by the engine cleanup step, so assert via content.
|
||||
const injection = result.find((m: any) => m.role === 'user' && String(m.content).includes('<user_memory>'));
|
||||
const injection = result.find(
|
||||
(m: any) => m.role === 'user' && String(m.content).includes('<user_memory>'),
|
||||
);
|
||||
expect(injection).toBeDefined();
|
||||
expect(injection!.role).toBe('user');
|
||||
});
|
||||
@@ -329,7 +328,6 @@ describe('serverMessagesEngine', () => {
|
||||
content: 'user input',
|
||||
createdAt: Date.now(),
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: Date.now(),
|
||||
} as UIChatMessage,
|
||||
|
||||
@@ -152,7 +152,6 @@ describe('messageRouter', () => {
|
||||
const mockQueryAll = vi.fn().mockResolvedValue([
|
||||
{
|
||||
id: 'msg1',
|
||||
meta: {},
|
||||
} as UIChatMessage,
|
||||
]);
|
||||
vi.mocked(MessageModel).mockImplementation(
|
||||
@@ -169,7 +168,7 @@ describe('messageRouter', () => {
|
||||
const result = await ctx.messageModel.queryAll();
|
||||
|
||||
expect(mockQueryAll).toHaveBeenCalled();
|
||||
expect(result).toEqual([{ id: 'msg1', meta: {} }]);
|
||||
expect(result).toEqual([{ id: 'msg1' }]);
|
||||
});
|
||||
|
||||
it('should handle removeMessage', async () => {
|
||||
|
||||
@@ -425,7 +425,6 @@ describe('ChatService', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-id',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
] as UIChatMessage[];
|
||||
@@ -517,7 +516,6 @@ describe('ChatService', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-id-2',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
] as UIChatMessage[];
|
||||
@@ -624,7 +622,6 @@ describe('ChatService', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-id-3',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
] as UIChatMessage[];
|
||||
@@ -678,9 +675,6 @@ describe('ChatService', () => {
|
||||
id: 'vyQvEw6V',
|
||||
updatedAt: 1702723964330,
|
||||
extra: {},
|
||||
meta: {
|
||||
avatar: DEFAULT_USER_AVATAR,
|
||||
},
|
||||
},
|
||||
] as UIChatMessage[];
|
||||
|
||||
|
||||
@@ -262,7 +262,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Continue our discussion',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-history',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -292,7 +291,6 @@ describe('contextEngineering', () => {
|
||||
imageList: [{ id: 'img1', url: 'http://example.com/image.png', alt: 'test.png' }],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-id',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -319,7 +317,6 @@ describe('contextEngineering', () => {
|
||||
imageList: [{ id: 'img1', url: 'http://example.com/image.png', alt: 'test.png' }],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-id-2',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -354,7 +351,6 @@ describe('contextEngineering', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-id-3',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -377,7 +373,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Hello {{username}}, today is {{date}} and the time is {{time}}',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-placeholder-1',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -385,7 +380,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Hi there! Your random number is {{random}}',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-placeholder-2',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -418,7 +412,6 @@ describe('contextEngineering', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-placeholder-array',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
] as any;
|
||||
@@ -443,7 +436,6 @@ describe('contextEngineering', () => {
|
||||
'Memory load: available={{memory_available}}, total contexts={{memory_contexts_count}}\n{{memory_summary}}',
|
||||
createdAt: Date.now(),
|
||||
id: 'memory-placeholder-test',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -451,7 +443,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Hello',
|
||||
createdAt: Date.now(),
|
||||
id: 'memory-placeholder-user',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -497,7 +488,9 @@ describe('contextEngineering', () => {
|
||||
|
||||
// Memory context is injected as a consolidated user message before the first user message
|
||||
// Note: meta/id fields are removed by the engine cleanup step, so assert via content.
|
||||
const injection = result.find((m: any) => m.role === 'user' && String(m.content).includes('<user_memory>'));
|
||||
const injection = result.find(
|
||||
(m: any) => m.role === 'user' && String(m.content).includes('<user_memory>'),
|
||||
);
|
||||
expect(injection).toBeDefined();
|
||||
expect(injection!.role).toBe('user');
|
||||
expect(injection!.content).toContain('<user_memory>');
|
||||
@@ -512,7 +505,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Hello {{username}}, missing: {{missing_var}}',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-placeholder-missing',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -533,7 +525,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Hello there, no variables here',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-no-placeholders',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -564,7 +555,6 @@ describe('contextEngineering', () => {
|
||||
],
|
||||
createdAt: Date.now(),
|
||||
id: 'test-combined',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -600,7 +590,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Message 1',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-1',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -608,7 +597,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Response 1',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-2',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -616,7 +604,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Message 2',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-3',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -624,7 +611,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Response 2',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-4',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -632,7 +618,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Latest message',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-5',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -662,7 +647,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Original user input',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-template',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -670,7 +654,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Assistant response',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-assistant',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -703,7 +686,6 @@ describe('contextEngineering', () => {
|
||||
content: 'User message',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-user',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -729,7 +711,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Old message 1',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-old-1',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -737,7 +718,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Old response',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-old-2',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -745,7 +725,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Recent input with {{username}}',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-recent',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -784,7 +763,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Simple message',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-simple',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -811,7 +789,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Message 1',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-1',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -819,7 +796,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Message 2',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-2',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
{
|
||||
@@ -827,7 +803,6 @@ describe('contextEngineering', () => {
|
||||
content: 'Message 3',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-3',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
@@ -861,7 +836,6 @@ describe('contextEngineering', () => {
|
||||
content: 'User message',
|
||||
createdAt: Date.now(),
|
||||
id: 'test-error',
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -198,7 +198,6 @@ export const createGroupOrchestrationExecutors = (
|
||||
content: agentInstruction,
|
||||
createdAt: now,
|
||||
id: `virtual_speak_instruction_${now}`,
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: now,
|
||||
},
|
||||
@@ -275,7 +274,6 @@ export const createGroupOrchestrationExecutors = (
|
||||
content: agentInstruction,
|
||||
createdAt: now,
|
||||
id: `virtual_broadcast_instruction_${now}`,
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: now,
|
||||
},
|
||||
|
||||
@@ -294,7 +294,6 @@ describe('call_tool executor', () => {
|
||||
content: '',
|
||||
pluginIntervention: { status: 'pending' },
|
||||
createdAt: Date.now(),
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
};
|
||||
mockStore.dbMessagesMap[context.messageKey] = [assistantMessage, existingToolMessage as any];
|
||||
@@ -342,7 +341,6 @@ describe('call_tool executor', () => {
|
||||
role: 'tool',
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
};
|
||||
mockStore.dbMessagesMap[context.messageKey] = [assistantMessage, existingToolMessage as any];
|
||||
@@ -1297,7 +1295,6 @@ describe('call_tool executor', () => {
|
||||
role: 'tool',
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
} as any,
|
||||
];
|
||||
@@ -1757,7 +1754,6 @@ describe('call_tool executor', () => {
|
||||
role: 'user',
|
||||
content: 'Hello',
|
||||
createdAt: Date.now(),
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
} as any,
|
||||
{
|
||||
@@ -1766,7 +1762,6 @@ describe('call_tool executor', () => {
|
||||
content: 'Hi',
|
||||
groupId: 'group_old',
|
||||
createdAt: Date.now(),
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
} as any,
|
||||
{
|
||||
@@ -1774,7 +1769,6 @@ describe('call_tool executor', () => {
|
||||
role: 'user',
|
||||
content: 'Question',
|
||||
createdAt: Date.now(),
|
||||
meta: {},
|
||||
updatedAt: Date.now(),
|
||||
} as any,
|
||||
createAssistantMessage({ groupId: 'group_latest' }),
|
||||
|
||||
@@ -9,7 +9,6 @@ export const createAssistantMessage = (overrides: Partial<UIChatMessage> = {}):
|
||||
content: 'I am an AI assistant.',
|
||||
createdAt: Date.now(),
|
||||
id: `msg_${nanoid()}`,
|
||||
meta: {},
|
||||
model: 'gpt-4',
|
||||
provider: 'openai',
|
||||
role: 'assistant',
|
||||
@@ -26,7 +25,6 @@ export const createUserMessage = (overrides: Partial<UIChatMessage> = {}): UICha
|
||||
content: 'Hello, AI!',
|
||||
createdAt: Date.now(),
|
||||
id: `msg_${nanoid()}`,
|
||||
meta: {},
|
||||
role: 'user',
|
||||
updatedAt: Date.now(),
|
||||
...overrides,
|
||||
@@ -41,7 +39,6 @@ export const createToolMessage = (overrides: Partial<UIChatMessage> = {}): UICha
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
id: `msg_${nanoid()}`,
|
||||
meta: {},
|
||||
plugin: {
|
||||
apiName: 'search',
|
||||
arguments: JSON.stringify({ query: 'test' }),
|
||||
|
||||
@@ -89,7 +89,6 @@ const createMockExecGroupAgentResponse = (overrides = {}) => ({
|
||||
content: TEST_CONTENT.GROUP_MESSAGE,
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: TEST_IDS.ASSISTANT_MESSAGE_ID,
|
||||
@@ -97,7 +96,6 @@ const createMockExecGroupAgentResponse = (overrides = {}) => ({
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
topics: {
|
||||
|
||||
@@ -49,7 +49,6 @@ const createStreamStartEvent = (overrides = {}): StreamEvent => ({
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
},
|
||||
...overrides,
|
||||
@@ -170,7 +169,6 @@ describe('runAgent actions', () => {
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -203,7 +201,6 @@ describe('runAgent actions', () => {
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -375,7 +375,6 @@ export const conversationLifecycle: StateCreator<
|
||||
content: `Context ${index + 1}:\n${title}${item.content}`,
|
||||
createdAt: now,
|
||||
id: `ctx_${tempId}_${index}`,
|
||||
meta: {},
|
||||
role: 'system' as const,
|
||||
updatedAt: now,
|
||||
};
|
||||
|
||||
@@ -62,7 +62,6 @@ describe('search actions', () => {
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
vi.spyOn(dbMessageSelectors, 'getDbMessageById').mockImplementation(
|
||||
@@ -116,7 +115,6 @@ describe('search actions', () => {
|
||||
content: '',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
vi.spyOn(dbMessageSelectors, 'getDbMessageById').mockImplementation(
|
||||
@@ -195,7 +193,6 @@ describe('search actions', () => {
|
||||
role: 'assistant',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
vi.spyOn(dbMessageSelectors, 'getDbMessageById').mockImplementation(
|
||||
@@ -284,7 +281,6 @@ describe('search actions', () => {
|
||||
role: 'tool',
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
vi.spyOn(dbMessageSelectors, 'getDbMessageById').mockImplementation(
|
||||
|
||||
@@ -14,7 +14,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
role: 'user',
|
||||
meta: {},
|
||||
},
|
||||
{
|
||||
id: 'message2',
|
||||
@@ -22,7 +21,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
role: 'assistant',
|
||||
meta: {},
|
||||
tools: [
|
||||
{ identifier: 'tool1', apiName: 'calculator', id: 'abc', type: 'default', arguments: '' },
|
||||
],
|
||||
@@ -102,7 +100,6 @@ describe('messagesReducer', () => {
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
role: 'user',
|
||||
meta: {},
|
||||
extra: { abc: '1' },
|
||||
} as UIChatMessage,
|
||||
...initialState,
|
||||
@@ -232,7 +229,6 @@ describe('messagesReducer', () => {
|
||||
content: 'Tool content',
|
||||
createdAt: 1629264000000,
|
||||
updatedAt: 1629264000000,
|
||||
meta: {},
|
||||
plugin: {
|
||||
identifier: 'tool1',
|
||||
apiName: 'calculator',
|
||||
@@ -487,7 +483,6 @@ describe('messagesReducer', () => {
|
||||
expect(newMessage?.role).toBe('user');
|
||||
expect(newMessage?.createdAt).toBeDefined();
|
||||
expect(newMessage?.updatedAt).toBeDefined();
|
||||
expect(newMessage?.meta).toEqual({});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ export const messagesReducer = (
|
||||
return produce(state, (draftState) => {
|
||||
const { value, id } = payload;
|
||||
|
||||
draftState.push({ ...value, createdAt: Date.now(), id, meta: {}, updatedAt: Date.now() });
|
||||
draftState.push({ ...value, createdAt: Date.now(), id, updatedAt: Date.now() });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -73,28 +73,16 @@ const mockedChats = [
|
||||
id: 'msg1',
|
||||
content: 'Hello World',
|
||||
role: 'user',
|
||||
meta: {
|
||||
avatar: '😀',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'msg2',
|
||||
content: 'Goodbye World',
|
||||
role: 'user',
|
||||
meta: {
|
||||
avatar: '😀',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'msg3',
|
||||
content: 'Function Message',
|
||||
role: 'tool',
|
||||
meta: {
|
||||
avatar: DEFAULT_INBOX_AVATAR,
|
||||
backgroundColor: 'rgba(0,0,0,0)',
|
||||
description: 'inbox.desc',
|
||||
title: 'inbox.title',
|
||||
},
|
||||
tools: [
|
||||
{
|
||||
arguments: ['arg1', 'arg2'],
|
||||
@@ -359,7 +347,6 @@ describe('displayMessageSelectors', () => {
|
||||
const chats = displayMessageSelectors.activeDisplayMessages(state);
|
||||
expect(chats).toHaveLength(1);
|
||||
expect(chats[0].id).toBe('msg1');
|
||||
expect(chats[0].meta).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { type AssistantContentBlock, type UIChatMessage } from '@lobechat/types';
|
||||
|
||||
import { DEFAULT_USER_AVATAR } from '@/const/meta';
|
||||
import { INBOX_SESSION_ID } from '@/const/session';
|
||||
import { useAgentStore } from '@/store/agent';
|
||||
import { agentChatConfigSelectors, agentSelectors } from '@/store/agent/selectors';
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { userProfileSelectors } from '@/store/user/selectors';
|
||||
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
||||
|
||||
import { chatHelpers } from '../../../helpers';
|
||||
import type { ChatStoreState } from '../../../initialState';
|
||||
@@ -18,38 +15,11 @@ import { messageMapKey } from '../../../utils/messageMapKey';
|
||||
* Use these selectors when you need to:
|
||||
* - Render messages in UI components
|
||||
* - Display assistantGroup messages with children
|
||||
* - Show messages with proper meta information
|
||||
* - Present message history with filters
|
||||
*
|
||||
* DO NOT use these for data mutations - use dbMessage.ts selectors instead.
|
||||
*/
|
||||
|
||||
// ============= Meta Information ========== //
|
||||
|
||||
const getMeta = (message: UIChatMessage) => {
|
||||
switch (message.role) {
|
||||
case 'user': {
|
||||
return {
|
||||
avatar: userProfileSelectors.userAvatar(useUserStore.getState()) || DEFAULT_USER_AVATAR,
|
||||
};
|
||||
}
|
||||
|
||||
case 'system': {
|
||||
return message.meta;
|
||||
}
|
||||
|
||||
default: {
|
||||
// For group chat, get meta from agent store by agentId
|
||||
if (message.groupId && message.agentId) {
|
||||
return agentSelectors.getAgentMetaById(message.agentId)(useAgentStore.getState());
|
||||
}
|
||||
|
||||
// Otherwise, use the current agent's meta for single agent chat
|
||||
return agentSelectors.currentAgentMeta(useAgentStore.getState());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// ============= Basic Display Message Access ========== //
|
||||
|
||||
/**
|
||||
@@ -59,13 +29,12 @@ export const currentDisplayChatKey = (s: ChatStoreState) =>
|
||||
messageMapKey({ agentId: s.activeAgentId, topicId: s.activeTopicId });
|
||||
|
||||
/**
|
||||
* Get display messages by key (with meta information)
|
||||
* Get display messages by key
|
||||
*/
|
||||
const getDisplayMessagesByKey =
|
||||
(key: string) =>
|
||||
(s: ChatStoreState): UIChatMessage[] => {
|
||||
const messages = s.messagesMap[key] || [];
|
||||
return messages.map((i) => ({ ...i, meta: getMeta(i) }));
|
||||
return s.messagesMap[key] || [];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -117,7 +117,6 @@ describe('chatDockSelectors', () => {
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
@@ -138,7 +137,6 @@ describe('chatDockSelectors', () => {
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
@@ -158,7 +156,6 @@ describe('chatDockSelectors', () => {
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
@@ -190,7 +187,6 @@ ${htmlContent}
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
@@ -211,7 +207,6 @@ ${htmlContent}
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
@@ -230,7 +225,6 @@ ${htmlContent}
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
@@ -249,7 +243,6 @@ ${htmlContent}
|
||||
createdAt: Date.now(),
|
||||
updatedAt: Date.now(),
|
||||
role: 'user',
|
||||
meta: {},
|
||||
sessionId: 'test-id',
|
||||
} as UIChatMessage,
|
||||
],
|
||||
|
||||
@@ -438,7 +438,6 @@ describe('thread action', () => {
|
||||
content: 'Hello',
|
||||
createdAt: Date.now(),
|
||||
id: 'msg-1',
|
||||
meta: {},
|
||||
role: 'user',
|
||||
agentId: 'test-session-id',
|
||||
updatedAt: Date.now(),
|
||||
|
||||
@@ -64,7 +64,6 @@ describe('ChatEnhanceAction', () => {
|
||||
updatedAt: Date.now(),
|
||||
role: 'assistant',
|
||||
sessionId: 'session',
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -306,7 +306,6 @@ describe('useToolStore:pluginStore', () => {
|
||||
type: 'plugin',
|
||||
manifest: {
|
||||
identifier: pluginIdentifier,
|
||||
meta: {},
|
||||
} as LobeChatPluginManifest,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user