feat(coding-agent): add automatic theme mode (#5874)

This commit is contained in:
Armin Ronacher
2026-06-18 17:13:47 +02:00
committed by GitHub
parent 908be616f2
commit d0b46764b1
16 changed files with 620 additions and 80 deletions

View File

@@ -198,6 +198,24 @@ describe("SettingsManager", () => {
});
});
describe("theme setting", () => {
it("stores slash-separated automatic theme settings separately from fixed theme names", async () => {
const settingsPath = join(agentDir, "settings.json");
writeFileSync(settingsPath, JSON.stringify({ theme: "light/dark" }));
const manager = SettingsManager.create(projectDir, agentDir);
expect(manager.getTheme()).toBeUndefined();
expect(manager.getThemeSetting()).toBe("light/dark");
manager.setTheme("solarized-light/tokyo-night");
await manager.flush();
const savedSettings = JSON.parse(readFileSync(settingsPath, "utf-8"));
expect(savedSettings.theme).toBe("solarized-light/tokyo-night");
});
});
describe("error tracking", () => {
it("should collect and clear load errors via drainErrors", () => {
const globalSettingsPath = join(agentDir, "settings.json");