mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: improve make it real action (#6830)
This commit is contained in:
@@ -30,6 +30,7 @@ export const promptKeys = [
|
||||
'Create a presentation',
|
||||
'Create headings',
|
||||
'Make it real',
|
||||
'Make it real with text',
|
||||
'Make it longer',
|
||||
'Make it shorter',
|
||||
'Continue writing',
|
||||
|
||||
@@ -246,12 +246,24 @@ export function setupAIProvider() {
|
||||
});
|
||||
|
||||
AIProvider.provide('makeItReal', options => {
|
||||
let promptName: PromptKey = 'Make it real';
|
||||
let content = options.content || '';
|
||||
|
||||
// wireframes
|
||||
if (options.attachments?.length) {
|
||||
content = `Here are the latest wireframes. Could you make a new website based on these wireframes and notes and send back just the html file?
|
||||
Here are our design notes:\n ${content}.`;
|
||||
} else {
|
||||
// notes
|
||||
promptName = 'Make it real with text';
|
||||
content = `Here are the latest notes: \n ${content}.
|
||||
Could you make a new website based on these notes and send back just the html file?`;
|
||||
}
|
||||
|
||||
return textToText({
|
||||
...options,
|
||||
promptName: 'Make it real',
|
||||
content:
|
||||
options.content ||
|
||||
'Here are the latest wireframes. Could you make a new website based on these wireframes and notes and send back just the html file?',
|
||||
content,
|
||||
promptName,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user