Skip to content

Commit b670300

Browse files
committed
fix:整理代码
1 parent 6559a82 commit b670300

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/chatPanel.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,14 @@ export class ChatPanel {
480480
}
481481

482482
private saveChatToFile(): void {
483-
if (!this.chatFilePath) return;
483+
if (!this.chatFilePath) {
484+
return;
485+
}
484486

485487
const now = Date.now();
486-
if (now - this.lastSaveTime < 10000) return;
488+
if (now - this.lastSaveTime < 10000) {
489+
return;
490+
}
487491

488492
const mdContent = this.conversation.map(msg => {
489493
return `@${msg.role === 'user' ? 'user' : 'AI'}:\n\n${msg.content}\n\n`;

0 commit comments

Comments
 (0)