Merge spike/claude-code-integration: PTY-based Claude Code with multi-agent support
Spike proved: spawning claude -p in a PTY from Rust gets Max subscription billing. Multi-agent concurrency confirmed with session resumption. Includes AgentPool REST API, claude-code provider, and spike documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> # Conflicts: # .ignore
This commit is contained in:
@@ -444,7 +444,8 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
|
||||
const messageToSend = messageOverride ?? input;
|
||||
if (!messageToSend.trim() || loading) return;
|
||||
|
||||
if (model.startsWith("claude-")) {
|
||||
const isClaudeCode = model === "claude-code-pty";
|
||||
if (!isClaudeCode && model.startsWith("claude-")) {
|
||||
const hasKey = await api.getAnthropicApiKeyExists();
|
||||
if (!hasKey) {
|
||||
pendingMessageRef.current = messageToSend;
|
||||
@@ -464,8 +465,13 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
|
||||
setStreamingContent("");
|
||||
|
||||
try {
|
||||
const provider = isClaudeCode
|
||||
? "claude-code"
|
||||
: model.startsWith("claude-")
|
||||
? "anthropic"
|
||||
: "ollama";
|
||||
const config: ProviderConfig = {
|
||||
provider: model.startsWith("claude-") ? "anthropic" : "ollama",
|
||||
provider,
|
||||
model,
|
||||
base_url: "http://localhost:11434",
|
||||
enable_tools: enableTools,
|
||||
|
||||
@@ -175,6 +175,11 @@ export function ChatHeader({
|
||||
backgroundSize: "10px",
|
||||
}}
|
||||
>
|
||||
<optgroup label="Claude Code (PTY)">
|
||||
<option value="claude-code-pty">
|
||||
claude-code-pty
|
||||
</option>
|
||||
</optgroup>
|
||||
{(claudeModels.length > 0 || !hasAnthropicKey) && (
|
||||
<optgroup label="Anthropic">
|
||||
{claudeModels.length > 0 ? (
|
||||
|
||||
@@ -5,6 +5,7 @@ import { defineConfig } from "vite";
|
||||
export default defineConfig(() => ({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:3001",
|
||||
|
||||
Reference in New Issue
Block a user