feat(terminal): tint terminal background per agent color
test / unit (pull_request) Successful in 29s
test / integration (pull_request) Successful in 17s

Add backend-agnostic terminal color support via OSC escape sequences:
- New backend/terminal.py with palette_printf() and exec_shell_script()
  shared by both Docker and smolmachines bottle backends
- Emits OSC 4 (indexed palette) + OSC 11 (default background tint)
  before launching; resets both on agent exit via OSC 104/111
- OSC 11 background tint is visible even when the TUI uses true/24-bit
  colors (which bypass the palette), as Codex does for its chrome
- Fix Codex [tui] config: status_line=["model-with-reasoning"],
  theme="ansi" (dark-ansi and cwd/directory were invalid identifiers)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 00:45:03 -04:00
parent d02226aab9
commit b1551045dc
9 changed files with 186 additions and 19 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ class TestAgentProviderRuntime(unittest.TestCase):
self.assertTrue(plan.has_prompt)
self.assertEqual("Existing instructions.\n", prompt)
self.assertIn("[tui]", config)
self.assertIn('status_line = ["model", "cwd"]', config)
self.assertIn('status_line = ["model-with-reasoning"]', config)
self.assertIn('terminal_title = ["spinner", "project"]', config)
def test_codex_forward_host_credentials_adds_auth_and_verify(self):