[kimi] refactor: extract helpers from chat() (#627) #686

Merged
kimi merged 1 commits from kimi/issue-627 into main 2026-03-21 03:33:16 +00:00
Collaborator

Fixes #627

Summary

  • Extracted _read_message_input(message: list[str]) -> str — handles joining CLI args and stdin reading
  • Extracted _resolve_session_id(session_id, new_session) -> str — resolves effective session ID
  • chat() is now a thin orchestrator calling these two helpers

Test plan

  • tox -e unit: 1889 passed, 0 failed (256 pre-existing ERRORs from missing modules — same on main)
  • tox -e lint: clean
  • tox -e format: clean
Fixes #627 ## Summary - Extracted `_read_message_input(message: list[str]) -> str` — handles joining CLI args and stdin reading - Extracted `_resolve_session_id(session_id, new_session) -> str` — resolves effective session ID - `chat()` is now a thin orchestrator calling these two helpers ## Test plan - `tox -e unit`: 1889 passed, 0 failed (256 pre-existing ERRORs from missing modules — same on main) - `tox -e lint`: clean - `tox -e format`: clean
kimi added 1 commit 2026-03-21 03:19:16 +00:00
refactor: extract _read_message_input and _resolve_session_id from chat()
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
9606899b10
Break up the 72-line chat() command into a thin orchestrator that
delegates stdin reading to _read_message_input() and session ID
resolution to _resolve_session_id().

Fixes #627

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kimi merged commit 11cd2e3372 into main 2026-03-21 03:33:16 +00:00
kimi deleted branch kimi/issue-627 2026-03-21 03:33:17 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#686