feat: proje temizleme ve bildirim deneyimini iyilestir
This commit is contained in:
@@ -56,6 +56,21 @@ app.post("/api/project/select", async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.post("/api/project/clear", async (req, res) => {
|
||||
try {
|
||||
await sessionManager.setProjectPath(null);
|
||||
res.json({
|
||||
ok: true,
|
||||
projectPath: sessionManager.getState().currentProjectPath
|
||||
});
|
||||
} catch (error) {
|
||||
res.status(500).json({
|
||||
ok: false,
|
||||
error: error.message
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (config.nodeEnv === "production") {
|
||||
app.use(express.static(webDistPath));
|
||||
app.get("*", (req, res) => {
|
||||
|
||||
@@ -2,7 +2,6 @@ import fs from "fs";
|
||||
import path from "path";
|
||||
import stripAnsi from "strip-ansi";
|
||||
import { buildBootstrapPrompt } from "./bootstrapPrompt.js";
|
||||
import { buildProjectSelectionPrompt } from "./bootstrapPrompt.js";
|
||||
import { LogService } from "./logService.js";
|
||||
import { PtyService } from "./ptyService.js";
|
||||
import { getClaudeEnv, getPublicRuntimeConfig } from "./config.js";
|
||||
@@ -125,7 +124,10 @@ export class SessionManager {
|
||||
|
||||
this.currentProjectPath = resolved;
|
||||
this.lastDirectedMember = null;
|
||||
this.setState({ currentProjectPath: resolved });
|
||||
this.setState({
|
||||
currentProjectPath: resolved,
|
||||
teamActivated: false
|
||||
});
|
||||
this.addLog("system", `Current project set to ${resolved ?? "None"}`);
|
||||
|
||||
if (wasRunning) {
|
||||
@@ -133,9 +135,6 @@ export class SessionManager {
|
||||
|
||||
if (resolved) {
|
||||
await this.activateTeam();
|
||||
} else {
|
||||
const prompt = buildProjectSelectionPrompt(this.getActiveWorkspaceDir());
|
||||
await this.sendRawPrompt(prompt, { label: `[project] Switched active project to ${this.getActiveWorkspaceDir()}` });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user