refactor: identify and freeze messages at creation
This commit is contained in:
@@ -8,8 +8,9 @@
|
||||
import { Context, Service } from 'cordis'
|
||||
import z from 'schemastery'
|
||||
import type { Agent } from '@deepseek-ai/dsh-agent'
|
||||
import { createUserMessage } from '@deepseek-ai/dsh-llm'
|
||||
import type { ContentBlock } from '@deepseek-ai/dsh-llm'
|
||||
import type { SessionId, UserMessageData } from '@deepseek-ai/dsh-session'
|
||||
import type { SessionId, UserMessage } from '@deepseek-ai/dsh-session'
|
||||
import type { SessionSurfaceSnapshot } from '@deepseek-ai/dsh-session-query'
|
||||
import {
|
||||
DEFAULT_CANDIDATE_LIMIT,
|
||||
@@ -192,10 +193,10 @@ export class SessionReferenceService extends Service {
|
||||
inputIndex: index,
|
||||
})),
|
||||
}
|
||||
const additionalContext: UserMessageData = {
|
||||
const additionalContext: UserMessage = createUserMessage({
|
||||
source,
|
||||
content: [{ type: 'text', text: prompt }],
|
||||
}
|
||||
})
|
||||
return { content: acceptedContent, additionalContext }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user