Skip to content

Commit 79abd52

Browse files
committed
refactor(cli): improve send-message hook architecture (Commit 2.1)
Extracts and reorganizes the send-message hook into focused modules: - use-message-execution.ts: Core SDK execution with agent resolution - use-run-state-persistence.ts: Run state management and persistence - helpers/send-message.ts: Helper functions for message preparation and error handling Fixes out-of-credits (402) error handling regression: - Preserves statusCode in ExecuteMessageError for HTTP errors - Detects 402 errors in the non-throwing path and handles them properly - Ensures UI switches to out-of-credits mode when credits are exhausted
1 parent eed92fb commit 79abd52

File tree

6 files changed

+1113
-141
lines changed

6 files changed

+1113
-141
lines changed

0 commit comments

Comments
 (0)