Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "lowcode",
"description": "lowcode tool, support ChatGPT",
"author": "wjkang <[email protected]>",
"version": "1.7.4",
"version": "1.7.5",
"icon": "asset/icon.png",
"publisher": "wjkang",
"repository": "https://github.com/lowcoding/lowcode-vscode",
Expand Down
13 changes: 8 additions & 5 deletions webview-react/src/pages/blocks/Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,14 @@ export default () => {
path,
createPath,
privateMaterials: model.selectedMaterial.privateMaterials,
}).then(() => {
model.setDirectoryModalVsible(false);
model.setLoding(false);
message.success('生成成功');
});
})
.then(() => {
model.setDirectoryModalVsible(false);
message.success('生成成功');
})
.finally(() => {
model.setLoding(false);
});
}}
/>
<JsonToTs
Expand Down
5 changes: 3 additions & 2 deletions webview-react/src/pages/chatGPT/presenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const usePresenter = () => {
model.listRef.current?.scrollTo(0, model.listRef.current.scrollHeight);
});

const initPrompt = localStorage.getItem('askChatGPT');
let initPrompt = localStorage.getItem('askChatGPT');
let askPrompt = '';
emitter.on('askChatGPT', (data) => {
askPrompt = data;
Expand All @@ -30,10 +30,11 @@ export const usePresenter = () => {
}
service.startAsk('NewSessionWithPrompt', data);
});
localStorage.removeItem('askChatGPT');
if (initPrompt && initPrompt !== askPrompt) {
service.startAsk('NewSessionWithPrompt', initPrompt);
}
localStorage.removeItem('askChatGPT');
initPrompt = '';

return () => {
emitter.off('chatGPTChunk');
Expand Down