Skip to content

Migrate minimal client command dispatcher - #10

Merged
TonyTown6033 merged 3 commits into
mainfrom
migrate/3-client-command-dispatcher
Oct 2, 2026
Merged

TonyTown6033 merged 3 commits into
mainfrom
migrate/3-client-command-dispatcher

Conversation

@TonyTown6033

@TonyTown6033 TonyTown6033 commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add the minimal client command dispatcher
  • support /help, /quit, and /disconnect
  • preserve regular message sending and connection behavior
  • add command dispatch tests

Validation

  • cargo fmt --check
  • cargo check
  • cargo test

Closes #3

@TonyTown6033

Copy link
Copy Markdown
Owner Author

@codex

@TonyTown6033

Copy link
Copy Markdown
Owner Author

not implement /connect

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50f954ebe7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/client.rs
];

fn handle_prompt(ctx: &mut Ctx, prompt: &str) {
let input = prompt.trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve whitespace in regular chat messages

For any regular message with leading or trailing whitespace, trim() changes the bytes sent to the server even though the unmodified line has already been appended to the sender's chat history. For example, entering hello displays that exact text locally but sends hello to peers, so transcripts diverge and whitespace-sensitive messages cannot be sent. Use a trimmed view only for command parsing and write the original prompt for non-command input.

Useful? React with 👍 / 👎.

@TonyTown6033

Copy link
Copy Markdown
Owner Author

good job

@TonyTown6033
TonyTown6033 merged commit 9ed5bd9 into main Oct 2, 2026
2 checks passed
@TonyTown6033
TonyTown6033 deleted the migrate/3-client-command-dispatcher branch October 2, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate the minimal client command dispatcher

2 participants