mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
fix: ai generation of mindmap fail from note text context (#8952)
Fix issue [AF-1632](https://linear.app/affine-design/issue/AF-1632). ### What Changed? - Keep the note selection and do not set the widget tool to copilot if asking AI from selection in a note in edgeless mode. - Remove `content` from `AIImageActionOptions`, using `input` as AI context like other actions.
This commit is contained in:
+4
-1
@@ -296,7 +296,7 @@ export function setupAIProvider(client: CopilotClient) {
|
||||
|
||||
AIProvider.provide('makeItReal', options => {
|
||||
let promptName: PromptKey = 'Make it real';
|
||||
let content = options.content || '';
|
||||
let content = options.input || '';
|
||||
|
||||
// wireframes
|
||||
if (options.attachments?.length) {
|
||||
@@ -374,6 +374,7 @@ Could you make a new website based on these notes and send back just the html fi
|
||||
return toImage({
|
||||
...options,
|
||||
client,
|
||||
content: options.input,
|
||||
promptName,
|
||||
});
|
||||
});
|
||||
@@ -384,6 +385,7 @@ Could you make a new website based on these notes and send back just the html fi
|
||||
return toImage({
|
||||
...options,
|
||||
client,
|
||||
content: options.input,
|
||||
timeout: 120000,
|
||||
promptName: promptName as PromptKey,
|
||||
workflow: !!promptName?.startsWith('workflow:'),
|
||||
@@ -398,6 +400,7 @@ Could you make a new website based on these notes and send back just the html fi
|
||||
return toImage({
|
||||
...options,
|
||||
client,
|
||||
content: options.input,
|
||||
timeout: 120000,
|
||||
promptName,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user