feat(im): add QuotedContext to shared types and IM service layer

This commit is contained in:
nullkey
2026-04-01 21:23:11 +08:00
committed by lyingbug
parent 3587ddb1c7
commit 4e7922c8a1
4 changed files with 85 additions and 5 deletions
+2
View File
@@ -99,6 +99,7 @@ type PipelineState struct {
RenderedContexts string `json:"-"`
ChatResponse *ChatResponse `json:"-"`
ImageDescription string `json:"-"`
QuotedContext string `json:"-"` // Quoted message text, injected at LLM prompt stage
SystemPromptOverride string `json:"-"`
}
@@ -195,6 +196,7 @@ func (c *ChatManage) Clone() *ChatManage {
RewriteQuery: c.RewriteQuery,
Intent: c.Intent,
ImageDescription: c.ImageDescription,
QuotedContext: c.QuotedContext,
SystemPromptOverride: c.SystemPromptOverride,
RenderedContexts: c.RenderedContexts,
},
+1
View File
@@ -16,4 +16,5 @@ type QARequest struct {
UserMessageID string // Created user message ID
WebSearchEnabled bool // Whether web search is enabled for this request
EnableMemory bool // Whether memory feature is enabled
QuotedContext string // Quoted message content from IM quote-reply (appended at LLM prompt stage, not used for retrieval)
}