feat: think-cli + think-server — remote coding agent#1135
Draft
mattzcarey wants to merge 2 commits intomainfrom
Draft
feat: think-cli + think-server — remote coding agent#1135mattzcarey wants to merge 2 commits intomainfrom
mattzcarey wants to merge 2 commits intomainfrom
Conversation
A terminal coding agent where all execution happens in Cloudflare Workers. ## think-server (apps/think-server/) - ThinkServer extends Think with workspace tools, code execution, git, memory - Model providers: Anthropic (direct + OpenCode gateway), OpenAI, Workers AI - Code tool: sandboxed V8 isolates with state.* (filesystem) + git.* (isomorphic-git) - Gated fetch: per-host secret bindings, auto-injected auth headers - Context memory: persistent blocks with staleness warnings (project + scratchpad) - Session persistence via Think's SessionManager ## think-cli (apps/think-cli/) - pi-tui terminal UI with pi dark theme - WebSocket native cf_agent_chat protocol - Slash commands with autocomplete (/resume, /clear, /new, /session, /model) - Session index at ~/.think/sessions.json for /resume - Print mode (-p) and JSON mode (--mode json) - Config at ~/.think/config.json (provider, model, apiKey, githubToken) - Auto-resolves API keys from env, OpenCode auth, gh CLI ## @cloudflare/shell/git (packages/shell/src/git/) - isomorphic-git wrapped as ToolProvider for codemode sandbox - CLI-matching commands: clone, status, add, commit, push, pull, checkout, log, etc. - fs-adapter bridges shell FileSystem to isomorphic-git's fs.promises - Auto-injected auth tokens (LLM never sees secrets) - 8 Workers pool tests (init, add, commit, log, status, branch, checkout, diff) ## Context API updates (packages/agents/src/experimental/memory/context/) - Add source field (system/user/project/local) to BlockDefinition - Add updatedAt timestamp to StoredBlock - Staleness warnings in toString() for memories >1 day old - AgentContextProvider stores source + updated_at in SQLite
… naming Extract shared tool rendering into ui/render.ts so live streaming and history restore use the same code paths. Fix history restore to show tool calls (was only rendering text parts). Add /name command for session aliases with fuzzy matching on /resume.
|
mattzcarey
commented
Mar 29, 2026
| const config = this.getConfig(); | ||
| const workspaceTools = createWorkspaceTools(this.workspace); | ||
| const stateProvider = stateToolsFromBackend(createWorkspaceStateBackend(this.workspace)); | ||
| const gitProvider = gitTools(this.workspace, { token: config?.githubToken }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/name) with fuzzy matching on/resumeTest plan
thinkCLI connects to local server, sends messages, streams responses/name,/resume,/new,/clear,/sessioncommands work