refactor: rename ChatAgent → Agent across the contract surface#137
Merged
Conversation
Scope: contract types strip prefix (Agent, AgentWithHistory). Data types go bare (Message, Role, ToolCall, ContentBlock, Subagent). Collision-prone types prefix with Agent (AgentCustomEvent, AgentInterrupt, AgentStatus, AgentSubmit*, AgentCheckpoint). No backwards-compat aliases, no structural changes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
8 tasks: rename agent/ files, testing/ files, exports, primitives + compositions, langgraph adapter file, cockpit consumers, then verify. git mv preserves history; ordered find/replace avoids partial matches. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Strip Chat prefix from contract types (Agent, AgentWithHistory) - Strip Chat prefix from data types (Message, Role, ToolCall, ContentBlock, Subagent) - Prefix Agent on collision-prone types (AgentStatus, AgentInterrupt, AgentCustomEvent, AgentSubmit*, AgentCheckpoint) - Rename mockChatAgent → mockAgent, conformance helpers analogously - File renames via git mv preserve history Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adapter function renamed to match Agent rename in @cacheplane/chat. ChatAgent → Agent, ChatAgentWithHistory → AgentWithHistory in return type and translation helpers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Updates imports of toChatAgent → toAgent and any direct Type references (ChatAgent, ChatMessage, etc.) to the new bare/Agent- prefixed names. Component class imports (ChatMessagesComponent etc.) are unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
ChatAgent/ChatAgentWithHistorytoAgent/AgentWithHistory.Chatprefix from message/data types:Message,Role,ToolCall,ContentBlock,Subagent.Agenton names that would collide otherwise:AgentCustomEvent(vs DOM),AgentInterrupt/AgentCheckpoint(vs@langchain/langgraph-sdk),AgentStatus(clarity),AgentSubmitInput/AgentSubmitOptions(clarity).toChatAgent→toAgent,mockChatAgent→mockAgent, conformance helpers analogously.Motivation
Naming clarity. The contract is agent-general; the `Chat` prefix obscured this and misaligned with industry vocabulary (OpenAI Agents SDK, AG-UI, Mastra, CrewAI, Pydantic AI all use `Agent`).
Test Plan
Design + plan
🤖 Generated with Claude Code