mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
feat: integrate 5 feature branches, upstream fixes, and MIME detection fix
Squashed 5 commits: Features (from 5 feature branches): - MCP fix, pipe mute, stub recovery - KAIROS activation, openclaw autonomy - Daemon/job command hierarchy + cross-platform bg engine Upstream fixes: - fix: Bun.hash compatibility - chore: chrome dependency update - docs: browser support guide MIME detection fix: - Screenshot detectMimeFromBase64(): decode raw bytes from base64 instead of broken charCodeAt comparison - Fixes API 400 on Windows (JPEG) and macOS (PNG) screenshots
This commit is contained in:
@@ -82,8 +82,13 @@ export function appendTeammateMessage(
|
||||
export function injectUserMessageToTeammate(
|
||||
taskId: string,
|
||||
message: string,
|
||||
options: {
|
||||
autonomyRunId?: string
|
||||
origin?: Message['origin']
|
||||
} | undefined,
|
||||
setAppState: SetAppState,
|
||||
): void {
|
||||
): boolean {
|
||||
let injected = false
|
||||
updateTaskState<InProcessTeammateTaskState>(taskId, setAppState, task => {
|
||||
// Allow message injection when teammate is running or idle (waiting for input)
|
||||
// Only reject if teammate is in a terminal state
|
||||
@@ -94,15 +99,29 @@ export function injectUserMessageToTeammate(
|
||||
return task
|
||||
}
|
||||
|
||||
injected = true
|
||||
return {
|
||||
...task,
|
||||
pendingUserMessages: [...task.pendingUserMessages, message],
|
||||
pendingUserMessages: [
|
||||
...task.pendingUserMessages,
|
||||
{
|
||||
message,
|
||||
...(options?.autonomyRunId
|
||||
? { autonomyRunId: options.autonomyRunId }
|
||||
: {}),
|
||||
...(options?.origin ? { origin: options.origin } : {}),
|
||||
},
|
||||
],
|
||||
messages: appendCappedMessage(
|
||||
task.messages,
|
||||
createUserMessage({ content: message }),
|
||||
createUserMessage({
|
||||
content: message,
|
||||
...(options?.origin ? { origin: options.origin } : {}),
|
||||
}),
|
||||
),
|
||||
}
|
||||
})
|
||||
return injected
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user