diff --git a/module/doc/js/selectlibtype.ui.js b/module/doc/js/selectlibtype.ui.js index 4239a9b0ae..e07b097993 100644 --- a/module/doc/js/selectlibtype.ui.js +++ b/module/doc/js/selectlibtype.ui.js @@ -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'); } diff --git a/www/js/zui3/ai.js b/www/js/zui3/ai.js index 4a59518225..b876fc4a4e 100644 --- a/www/js/zui3/ai.js +++ b/www/js/zui3/ai.js @@ -171,7 +171,7 @@ window.executeZentaoPrompt = async function(info, testingMode) }; diffView = h`
${info.targetFormName}
${Object.entries(result).map(entry => renderProp(entry[0], entry[1]))}
`; } - sessionStorage.setItem('aiResult', JSON.stringify(result)); + localStorage.setItem('aiResult', JSON.stringify(result)); return { view: [response.title ? h`

${response.title}

` : null, diffView, explainView],