* [bug#68147] fix the creating doc issues of ai.

This commit is contained in:
wangzemei
2025-12-18 16:42:48 +08:00
parent 2d1913beb4
commit a840a17113
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -125,9 +125,9 @@ window.reloadApi = function()
*/
window.redirectParentWindow = function(link, from, spaceID, libID, moduleID)
{
if(from === 'ai' && sessionStorage.getItem('aiResult'))
if(from === 'ai' && localStorage.getItem('aiResult'))
{
const aiResult = JSON.parse(sessionStorage.getItem('aiResult'));
const aiResult = JSON.parse(localStorage.getItem('aiResult'));
zui.DocApp.storeNextCreatingDoc({
content: aiResult.content || '',
contentType: 'markdown',
@@ -135,7 +135,7 @@ window.redirectParentWindow = function(link, from, spaceID, libID, moduleID)
lib: Number(libID),
module: Number(moduleID),
});
sessionStorage.removeItem('aiResult');
localStorage.removeItem('aiResult');
}
openUrl(link, 'doc');
}
+1 -1
View File
@@ -171,7 +171,7 @@ window.executeZentaoPrompt = async function(info, testingMode)
};
diffView = h`<h6>${info.targetFormName}</h6><div class="ring rounded p-2 article whitespace-prewrap col gap-2 success-pale">${Object.entries(result).map(entry => renderProp(entry[0], entry[1]))}</div>`;
}
sessionStorage.setItem('aiResult', JSON.stringify(result));
localStorage.setItem('aiResult', JSON.stringify(result));
return {
view: [response.title ? h`<h4>${response.title}</h4>` : null, diffView, explainView],