远程读取日志

This commit is contained in:
YHH
2025-10-16 17:10:22 +08:00
parent 1ec7892338
commit 43bdd7e43b
16 changed files with 966 additions and 80 deletions

View File

@@ -64,4 +64,25 @@ export class SettingsService {
public getAll(): Record<string, any> {
return Object.fromEntries(this.settings);
}
public getRecentProjects(): string[] {
return this.get<string[]>('recentProjects', []);
}
public addRecentProject(projectPath: string): void {
const recentProjects = this.getRecentProjects();
const filtered = recentProjects.filter(p => p !== projectPath);
const updated = [projectPath, ...filtered].slice(0, 10);
this.set('recentProjects', updated);
}
public removeRecentProject(projectPath: string): void {
const recentProjects = this.getRecentProjects();
const filtered = recentProjects.filter(p => p !== projectPath);
this.set('recentProjects', filtered);
}
public clearRecentProjects(): void {
this.set('recentProjects', []);
}
}