mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🤖 refactor: Improve Agent Handoff Context Tracking (#10553)
* chore: update @librechat/agents dependency to version 3.0.18 * refactor: add optional metadata field to message schema and types * chore: update @librechat/agents to v3.0.19 * refactor: update return type of sendCompletion method to include metadata * chore: linting * chore: update @librechat/agents dependency to v3.0.20 * refactor: implement agent labeling for conversation history in multi-agent scenarios * refactor: improve error handling for capturing agent ID map in AgentClient * refactor: clear agentIdMap and related properties during client disposal to prevent memory leaks * chore: update sendCompletion method for FakeClient to return an object with completion and metadata fields
This commit is contained in:
parent
bdc47dbe47
commit
c0cb48256e
12 changed files with 122 additions and 22 deletions
|
|
@ -84,7 +84,7 @@
|
|||
"@azure/storage-blob": "^12.27.0",
|
||||
"@keyv/redis": "^4.3.3",
|
||||
"@langchain/core": "^0.3.79",
|
||||
"@librechat/agents": "^3.0.17",
|
||||
"@librechat/agents": "^3.0.20",
|
||||
"@librechat/data-schemas": "*",
|
||||
"@modelcontextprotocol/sdk": "^1.21.0",
|
||||
"axios": "^1.12.1",
|
||||
|
|
|
|||
|
|
@ -610,6 +610,8 @@ export const tMessageSchema = z.object({
|
|||
/* frontend components */
|
||||
iconURL: z.string().nullable().optional(),
|
||||
feedback: feedbackSchema.optional(),
|
||||
/** metadata */
|
||||
metadata: z.record(z.unknown()).optional(),
|
||||
});
|
||||
|
||||
export type MemoryArtifact = {
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ const messageSchema: Schema<IMessage> = new Schema(
|
|||
iconURL: {
|
||||
type: String,
|
||||
},
|
||||
metadata: { type: mongoose.Schema.Types.Mixed },
|
||||
attachments: { type: [{ type: mongoose.Schema.Types.Mixed }], default: undefined },
|
||||
/*
|
||||
attachments: {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export interface IMessage extends Document {
|
|||
content?: unknown[];
|
||||
thread_id?: string;
|
||||
iconURL?: string;
|
||||
metadata?: Record<string, unknown>;
|
||||
attachments?: unknown[];
|
||||
expiredAt?: Date;
|
||||
createdAt?: Date;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue