mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 02:35:58 +08:00
feat(core): add ai file context api (#10842)
Close [BS-2349](https://linear.app/affine-design/issue/BS-2349). ### What Changed? - Add file context graphql apis - Pass matched file chunks to LLM [录屏2025-02-19 23.27.47.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/8e8a98ca-6959-4bb6-9759-b51d97cede49.mov" />](https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/8e8a98ca-6959-4bb6-9759-b51d97cede49.mov)
This commit is contained in:
@@ -141,6 +141,7 @@ export class ChatSession implements AsyncDisposable {
|
||||
finish(params: PromptParams): PromptMessage[] {
|
||||
const messages = this.takeMessages();
|
||||
const firstMessage = messages.at(0);
|
||||
// TODO: refactor this {{content}} keyword agreement
|
||||
// if the message in prompt config contains {{content}},
|
||||
// we should combine it with the user message in the prompt
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user