Skip to content

Commit 801d41d

Browse files
committed
frontend/llm-history/generate-doc: add the prompt right away, not during saving
1 parent 74141e5 commit 801d41d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/packages/frontend/project/page/home-page/ai-generate-document.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ function AIGenerateDocument({
327327

328328
const { input, history, system } = fullPrompt;
329329

330+
// Add prompt to history
331+
addPrompt(prompt);
332+
330333
try {
331334
cancel.current = false;
332335
setQuerying(true);
@@ -366,9 +369,6 @@ function AIGenerateDocument({
366369
};
367370
projectActions?.log(event);
368371

369-
// Add prompt to history
370-
addPrompt(prompt);
371-
372372
const what = intl.formatMessage(
373373
{
374374
id: "project.page.ai-generate-document.create_document.what",

0 commit comments

Comments
 (0)