24. Migrate Ideas to Local Qwen
What Transfers Cleanly
If your runtime model is local Qwen, the biggest transferable value from this source is not “Claude behavior.” It is the client architecture around the model.
- Startup shell structure from
main.tsx - Tool contracts from
Tool.ts - Safe shell execution from
tools/BashTool/* - File reading and editing patterns from
FileReadToolandFileEditTool - Session handling from
history.ts,services/compact/*, andservices/SessionMemory/*
What Will Not Transfer Automatically
- Model quality and planning reliability
- Long-chain tool use stability
- Strong code-edit judgment
- Claude-specific request semantics and beta headers
Migration Strategy
| Keep | Rewrite | Drop for now |
|---|---|---|
| CLI shell, tool interface, permission model | Model adapter for Qwen/Ollama/vLLM | Complex internal-only feature flags |
| Basic session history and compacting ideas | Prompt templates tuned for weaker local models | Enterprise/provider-specific auth branches |
| Read/edit/bash guardrails | Tool descriptions optimized for your model | Anthropic-specific telemetry and growthbook logic |
Source Navigation
Recommended Source Files
source/services/api/client.tssource/services/api/claude.tssource/tools.tssource/tools/BashTool/BashTool.tsxsource/components/PromptInput
Next Files to Read
source/services/tools/toolExecution.tssource/tools/FileReadTool/FileReadTool.tssource/state/AppStateStore.ts