refactor: move slash command handling into chatwidget (#2536)

no functional change, just moving the code that handles /foo into
chatwidget, since most commands just do things with chatwidget.
This commit is contained in:
Jeremy Rose
2025-08-21 10:36:58 -07:00
committed by GitHub
parent 9604671678
commit 16d16a4ddc
5 changed files with 137 additions and 152 deletions

View File

@@ -132,13 +132,11 @@ pub(crate) fn log_inbound_app_event(event: &AppEvent) {
AppEvent::CodexEvent(ev) => {
write_record("to_tui", "codex_event", ev);
}
AppEvent::DispatchCommand(cmd) => {
AppEvent::NewSession => {
let value = json!({
"ts": now_ts(),
"dir": "to_tui",
"kind": "slash_command",
"command": format!("{:?}", cmd),
"kind": "new_session",
});
LOGGER.write_json_line(value);
}