* [bug#68147] fix the creating doc issues of ai.
This commit is contained in:
@@ -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
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user