Skip to content

feat: add Codex Chat/Ask/Code modes with readonly Ask profile#13

Open
z13321812367-sys wants to merge 13 commits into
BigStrongSun:mainfrom
z13321812367-sys:codex/chat-ask-custom-model-profiles
Open

feat: add Codex Chat/Ask/Code modes with readonly Ask profile#13
z13321812367-sys wants to merge 13 commits into
BigStrongSun:mainfrom
z13321812367-sys:codex/chat-ask-custom-model-profiles

Conversation

@z13321812367-sys

@z13321812367-sys z13321812367-sys commented Jul 10, 2026

Copy link
Copy Markdown

Summary

Adds runtime Chat / Ask / Code modes for Codex-routed custom providers.

Chat

  • Removes Codex agent instructions, project context, tools, and tool history.
  • Reapplies after history enrichment to avoid restored tool/code history leaking into Chat.

Ask

  • Keeps only readonly MCP resource tools.
  • Sanitizes environment context.
  • Filters MCP discovery output to the readonly project server.

Code

  • Keeps existing passthrough behavior.

Also includes Codex router/catalog hardening and upstream v3.16.4-16 merge.

Additional hardening

  • Scopes Codex Chat/Ask profiles to resolved custom routed providers instead of model-name-only matching.
  • Extends Ask environment-context sanitization to top-level text and string content shapes.

Validation

  • cargo fmt
  • cargo test --manifest-path .\src-tauri\Cargo.toml --lib claude_chat_profile
  • cargo test --manifest-path .\src-tauri\Cargo.toml --lib claude_ask_profile
  • cargo test --manifest-path .\src-tauri\Cargo.toml --lib deepseek
  • cargo test --manifest-path .\src-tauri\Cargo.toml --lib custom_routed
  • cargo check --manifest-path .\src-tauri\Cargo.toml --bin cc-switch
  • pnpm typecheck

mislaiddd added 5 commits July 8, 2026 05:23
…e Sonnet 5

- Add InteractionMode enum (Chat/Ask/Code) stored in ProxyService Arc<RwLock<>>
- Add Chat Profile: remove tools/instructions/reasoning/project context
- Add Ask Profile: remove instructions, filter to 3 read-only MCP tools,
  sanitize environment_context to cwd-only, strip non-MCP tool protocol
- Add ccswitch-readonly-mcp binary exposing project-tree/file MCP resources
- Fix Code continuation for tool call sequences (transform_codex_chat.rs)
- Add UI toggle [Chat] [Ask] [Code] in proxy status bar with aria-pressed
- Register ccswitch_readonly MCP server in ~/.codex/config.toml
- Add gpt-5.4-mini request shape logging
- Preserve existing Chat and Code paths unchanged
@z13321812367-sys z13321812367-sys changed the title fix: scope Codex Chat and Ask profiles to routed providers feat: add Codex Chat/Ask/Code modes with readonly Ask profile Jul 10, 2026
@z13321812367-sys z13321812367-sys force-pushed the codex/chat-ask-custom-model-profiles branch 2 times, most recently from 5fbdebe to 5b3e54f Compare July 10, 2026 01:27
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.

2 participants