Merge pull request #105 from rajrasane/fix/third-party-provider-compatibility

fix: Improve session title handling and Docker compatibility
This commit is contained in:
Kevin Codex
2026-04-02 13:50:18 +08:00
committed by GitHub
5 changed files with 376 additions and 372 deletions

View File

@@ -289,7 +289,7 @@ function checkOllamaProcessorMode(): CheckResult {
if (result.status !== 0) { if (result.status !== 0) {
const detail = (result.stderr || result.stdout || 'Unable to run ollama ps').trim() const detail = (result.stderr || result.stdout || 'Unable to run ollama ps').trim()
return fail('Ollama processor mode', detail) return pass('Ollama processor mode', `Native CLI check failed (${detail}). Assuming valid Docker/remote backend since HTTP ping passed.`)
} }
const output = (result.stdout || '').trim() const output = (result.stdout || '').trim()

View File

@@ -1127,7 +1127,7 @@ export function REPL({
// session from mid-conversation context. // session from mid-conversation context.
const haikuTitleAttemptedRef = useRef((initialMessages?.length ?? 0) > 0); const haikuTitleAttemptedRef = useRef((initialMessages?.length ?? 0) > 0);
const agentTitle = mainThreadAgentDefinition?.agentType; const agentTitle = mainThreadAgentDefinition?.agentType;
const terminalTitle = sessionTitle ?? agentTitle ?? haikuTitle ?? 'Claude Code'; const terminalTitle = sessionTitle ?? agentTitle ?? haikuTitle ?? 'Open Claude';
const isWaitingForApproval = toolUseConfirmQueue.length > 0 || promptQueue.length > 0 || pendingWorkerRequest || pendingSandboxRequest; const isWaitingForApproval = toolUseConfirmQueue.length > 0 || promptQueue.length > 0 || pendingWorkerRequest || pendingSandboxRequest;
// Local-jsx commands (like /plugin, /config) show user-facing dialogs that // Local-jsx commands (like /plugin, /config) show user-facing dialogs that
// wait for input. Require jsx != null — if the flag is stuck true but jsx // wait for input. Require jsx != null — if the flag is stuck true but jsx
@@ -2676,7 +2676,7 @@ export function REPL({
// useDeferredHookMessages) and attachment messages (appended by // useDeferredHookMessages) and attachment messages (appended by
// processTextPrompt) — both pushed length past 1 on turn one, so the // processTextPrompt) — both pushed length past 1 on turn one, so the
// title silently fell through to the "Claude Code" default. // title silently fell through to the "Claude Code" default.
if (getAPIProvider() === 'firstParty' && !titleDisabled && !sessionTitle && !agentTitle && !haikuTitleAttemptedRef.current) { if (!titleDisabled && !sessionTitle && !agentTitle && !haikuTitleAttemptedRef.current) {
const firstUserMessage = newMessages.find(m => m.type === 'user' && !m.isMeta); const firstUserMessage = newMessages.find(m => m.type === 'user' && !m.isMeta);
const text = firstUserMessage?.type === 'user' ? getContentText(firstUserMessage.message.content) : null; const text = firstUserMessage?.type === 'user' ? getContentText(firstUserMessage.message.content) : null;
// Skip synthetic breadcrumbs — slash-command output, prompt-skill // Skip synthetic breadcrumbs — slash-command output, prompt-skill

View File

@@ -985,7 +985,7 @@ export const connectToServer = memoize(
const client = new Client( const client = new Client(
{ {
name: 'claude-code', name: 'claude-code',
title: 'Claude Code', title: 'Open Claude',
version: MACRO.VERSION ?? 'unknown', version: MACRO.VERSION ?? 'unknown',
description: "Anthropic's agentic coding tool", description: "Anthropic's agentic coding tool",
websiteUrl: PRODUCT_URL, websiteUrl: PRODUCT_URL,
@@ -3280,7 +3280,7 @@ export async function setupSdkMcpClients(
const client = new Client( const client = new Client(
{ {
name: 'claude-code', name: 'claude-code',
title: 'Claude Code', title: 'Open Claude',
version: MACRO.VERSION ?? 'unknown', version: MACRO.VERSION ?? 'unknown',
description: "Anthropic's agentic coding tool", description: "Anthropic's agentic coding tool",
websiteUrl: PRODUCT_URL, websiteUrl: PRODUCT_URL,

View File

@@ -35,7 +35,7 @@ export async function sendNotification(
}) })
} }
const DEFAULT_TITLE = 'Claude Code' const DEFAULT_TITLE = 'Open Claude'
async function sendToChannel( async function sendToChannel(
channel: string, channel: string,

View File

@@ -124,6 +124,10 @@ export async function generateSessionTitle(
level: 'error', level: 'error',
}) })
logEvent('tengu_session_title_generated', { success: false }) logEvent('tengu_session_title_generated', { success: false })
return null
// Fallback: When using 3P providers without a compatible schema,
// default to the application name.
return 'Open Claude'
} }
} }