Skip to content

Commit e55a506

Browse files
committed
fix in show terminal
1 parent 811bb6d commit e55a506

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/panels/RequestPanel.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,17 @@ export class Lama2Panel {
7373
status: "starting",
7474
})
7575

76-
const { cmd, rflag, rfile, rlog } = getLama2Command()
77-
this.rfile = rfile
78-
this.rlog = rlog
79-
this.setLama2Watch(rflag)
76+
const lama2Command = getLama2Command();
77+
if (!lama2Command) {
78+
console.error("Failed to generate Lama2 command");
79+
return;
80+
}
81+
82+
const { cmd, rflag, rfile, rlog } = lama2Command;
83+
this.rfile = rfile;
84+
this.rlog = rlog;
85+
this.setLama2Watch(rflag);
86+
8087

8188
// Execute command and capture output
8289
let terminal = getShowLama2Term("AutoLama2")
@@ -86,6 +93,7 @@ export class Lama2Panel {
8693
this._panel.webview.onDidReceiveMessage((message) => {
8794
switch (message.command) {
8895
case "toggleTerminal":
96+
console.log("isVisble", isVisible)
8997
if (isVisible) {
9098
terminal.hide()
9199
isVisible = false

src/utilities/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export function getLama2Command() {
6060
}
6161
randomNameFlag = `${windowsBasePath}\\${randomNameBase}.flag`;
6262
randomNameFile = `${windowsBasePath}\\${randomNameBase}.json`;
63+
randomNameLog = `${windowsBasePath}\\${randomNameBase}.log`;
6364
cmd = `powershell l2 -o ${randomNameFile} ${currentFilePath}; New-Item -Path ${randomNameFlag}`;
6465
} else {
6566
randomNameFlag = `/tmp/${randomNameBase}.flag`;

0 commit comments

Comments
 (0)