fix: improve terminal buffer cleaning and test reliability

- Add buffer cleaning to remove junk before Claude banner
- Fix test todo text to avoid pattern conflicts
- Add reset support to inner-config API endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-21 04:34:45 +01:00
co-authored by Claude Opus 4.5
parent 678d43d559
commit d741b82966
3 changed files with 56 additions and 4 deletions
+1 -1
View File
@@ -425,7 +425,7 @@ describe('InnerLoopTracker', () => {
it('should clear all state', () => {
tracker.startLoop('TEST');
tracker.processTerminalData('- [ ] Task\n');
tracker.processTerminalData('- [ ] Test task to clear\n');
expect(tracker.loopState.active).toBe(true);
expect(tracker.todos).toHaveLength(1);
+5
View File
@@ -21,6 +21,11 @@ class MockSession extends EventEmitter {
this.writeBuffer.push(data);
}
writeViaScreen(data: string): boolean {
this.writeBuffer.push(data);
return true;
}
// Simulate terminal output
simulateTerminalOutput(data: string): void {
this.emit('terminal', data);