feat(coding-agent): add configurable assistant output padding
Closes #6168
This commit is contained in:
@@ -397,6 +397,29 @@ describe("SettingsManager", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("outputPad", () => {
|
||||
it("should default to 1 and persist binary values", async () => {
|
||||
const manager = SettingsManager.create(projectDir, agentDir);
|
||||
|
||||
expect(manager.getOutputPad()).toBe(1);
|
||||
|
||||
manager.setOutputPad(0);
|
||||
await manager.flush();
|
||||
|
||||
expect(manager.getOutputPad()).toBe(0);
|
||||
const savedSettings = JSON.parse(readFileSync(join(agentDir, "settings.json"), "utf-8"));
|
||||
expect(savedSettings.outputPad).toBe(0);
|
||||
});
|
||||
|
||||
it("should treat unsupported outputPad values as default padding", () => {
|
||||
writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ outputPad: 2 }));
|
||||
|
||||
const manager = SettingsManager.create(projectDir, agentDir);
|
||||
|
||||
expect(manager.getOutputPad()).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("shellCommandPrefix", () => {
|
||||
it("should load shellCommandPrefix from settings", () => {
|
||||
const settingsPath = join(agentDir, "settings.json");
|
||||
|
||||
Reference in New Issue
Block a user