chore: rename default terminal title to Open Claude
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ import { getLoggingSafeMcpBaseUrl } from './utils.js'
|
|||||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||||
const fetchMcpSkillsForClient = feature('MCP_SKILLS')
|
const fetchMcpSkillsForClient = feature('MCP_SKILLS')
|
||||||
? (
|
? (
|
||||||
require('../../skills/mcpSkills.js') as typeof import('../../skills/mcpSkills.js')
|
require('../../skills/mcpSkills.js') as typeof import('../../skills/mcpSkills.js')
|
||||||
).fetchMcpSkillsForClient
|
).fetchMcpSkillsForClient
|
||||||
: null
|
: null
|
||||||
|
|
||||||
import { UnauthorizedError } from '@modelcontextprotocol/sdk/client/auth.js'
|
import { UnauthorizedError } from '@modelcontextprotocol/sdk/client/auth.js'
|
||||||
@@ -240,12 +240,12 @@ const claudeInChromeToolRendering =
|
|||||||
// GrowthBook tengu_malort_pedway (see gates.ts).
|
// GrowthBook tengu_malort_pedway (see gates.ts).
|
||||||
const computerUseWrapper = feature('CHICAGO_MCP')
|
const computerUseWrapper = feature('CHICAGO_MCP')
|
||||||
? (): typeof import('../../utils/computerUse/wrapper.js') =>
|
? (): typeof import('../../utils/computerUse/wrapper.js') =>
|
||||||
require('../../utils/computerUse/wrapper.js')
|
require('../../utils/computerUse/wrapper.js')
|
||||||
: undefined
|
: undefined
|
||||||
const isComputerUseMCPServer = feature('CHICAGO_MCP')
|
const isComputerUseMCPServer = feature('CHICAGO_MCP')
|
||||||
? (
|
? (
|
||||||
require('../../utils/computerUse/common.js') as typeof import('../../utils/computerUse/common.js')
|
require('../../utils/computerUse/common.js') as typeof import('../../utils/computerUse/common.js')
|
||||||
).isComputerUseMCPServer
|
).isComputerUseMCPServer
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
import { mkdir, readFile, unlink, writeFile } from 'fs/promises'
|
import { mkdir, readFile, unlink, writeFile } from 'fs/promises'
|
||||||
@@ -326,9 +326,9 @@ function mcpBaseUrlAnalytics(serverRef: ScopedMcpServerConfig): {
|
|||||||
const url = getLoggingSafeMcpBaseUrl(serverRef)
|
const url = getLoggingSafeMcpBaseUrl(serverRef)
|
||||||
return url
|
return url
|
||||||
? {
|
? {
|
||||||
mcpServerBaseUrl:
|
mcpServerBaseUrl:
|
||||||
url as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
url as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||||
}
|
}
|
||||||
: {}
|
: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,20 +683,20 @@ export const connectToServer = memoize(
|
|||||||
const transportOptions: SSEClientTransportOptions =
|
const transportOptions: SSEClientTransportOptions =
|
||||||
proxyOptions.dispatcher
|
proxyOptions.dispatcher
|
||||||
? {
|
? {
|
||||||
eventSourceInit: {
|
eventSourceInit: {
|
||||||
fetch: async (url: string | URL, init?: RequestInit) => {
|
fetch: async (url: string | URL, init?: RequestInit) => {
|
||||||
// eslint-disable-next-line eslint-plugin-n/no-unsupported-features/node-builtins
|
// eslint-disable-next-line eslint-plugin-n/no-unsupported-features/node-builtins
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
...init,
|
...init,
|
||||||
...proxyOptions,
|
...proxyOptions,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': getMCPUserAgent(),
|
'User-Agent': getMCPUserAgent(),
|
||||||
...init?.headers,
|
...init?.headers,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
}
|
||||||
: {}
|
: {}
|
||||||
|
|
||||||
transport = new SSEClientTransport(
|
transport = new SSEClientTransport(
|
||||||
@@ -832,8 +832,8 @@ export const connectToServer = memoize(
|
|||||||
'User-Agent': getMCPUserAgent(),
|
'User-Agent': getMCPUserAgent(),
|
||||||
...(sessionIngressToken &&
|
...(sessionIngressToken &&
|
||||||
!hasOAuthTokens && {
|
!hasOAuthTokens && {
|
||||||
Authorization: `Bearer ${sessionIngressToken}`,
|
Authorization: `Bearer ${sessionIngressToken}`,
|
||||||
}),
|
}),
|
||||||
...combinedHeaders,
|
...combinedHeaders,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -842,10 +842,10 @@ export const connectToServer = memoize(
|
|||||||
// Redact sensitive headers before logging
|
// Redact sensitive headers before logging
|
||||||
const headersForLogging = transportOptions.requestInit?.headers
|
const headersForLogging = transportOptions.requestInit?.headers
|
||||||
? mapValues(
|
? mapValues(
|
||||||
transportOptions.requestInit.headers as Record<string, string>,
|
transportOptions.requestInit.headers as Record<string, string>,
|
||||||
(value, key) =>
|
(value, key) =>
|
||||||
key.toLowerCase() === 'authorization' ? '[REDACTED]' : value,
|
key.toLowerCase() === 'authorization' ? '[REDACTED]' : value,
|
||||||
)
|
)
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
logMCPDebug(
|
logMCPDebug(
|
||||||
@@ -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,
|
||||||
@@ -1054,9 +1054,9 @@ export const connectToServer = memoize(
|
|||||||
`Connection timeout triggered after ${elapsed}ms (limit: ${getConnectionTimeoutMs()}ms)`,
|
`Connection timeout triggered after ${elapsed}ms (limit: ${getConnectionTimeoutMs()}ms)`,
|
||||||
)
|
)
|
||||||
if (inProcessServer) {
|
if (inProcessServer) {
|
||||||
inProcessServer.close().catch(() => {})
|
inProcessServer.close().catch(() => { })
|
||||||
}
|
}
|
||||||
transport.close().catch(() => {})
|
transport.close().catch(() => { })
|
||||||
reject(
|
reject(
|
||||||
new TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS(
|
new TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS(
|
||||||
`MCP server "${name}" connection timed out after ${getConnectionTimeoutMs()}ms`,
|
`MCP server "${name}" connection timed out after ${getConnectionTimeoutMs()}ms`,
|
||||||
@@ -1145,9 +1145,9 @@ export const connectToServer = memoize(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (inProcessServer) {
|
if (inProcessServer) {
|
||||||
inProcessServer.close().catch(() => {})
|
inProcessServer.close().catch(() => { })
|
||||||
}
|
}
|
||||||
transport.close().catch(() => {})
|
transport.close().catch(() => { })
|
||||||
if (stderrOutput) {
|
if (stderrOutput) {
|
||||||
logMCPError(name, `Server stderr: ${stderrOutput}`)
|
logMCPError(name, `Server stderr: ${stderrOutput}`)
|
||||||
}
|
}
|
||||||
@@ -1627,7 +1627,7 @@ export const connectToServer = memoize(
|
|||||||
logMCPError(name, `Connection failed: ${errorMessage(error)}`)
|
logMCPError(name, `Connection failed: ${errorMessage(error)}`)
|
||||||
|
|
||||||
if (inProcessServer) {
|
if (inProcessServer) {
|
||||||
inProcessServer.close().catch(() => {})
|
inProcessServer.close().catch(() => { })
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
@@ -1779,8 +1779,8 @@ export const fetchToolsForClient = memoizeWithLRU(
|
|||||||
searchHint:
|
searchHint:
|
||||||
typeof tool._meta?.['anthropic/searchHint'] === 'string'
|
typeof tool._meta?.['anthropic/searchHint'] === 'string'
|
||||||
? tool._meta['anthropic/searchHint']
|
? tool._meta['anthropic/searchHint']
|
||||||
.replace(/\s+/g, ' ')
|
.replace(/\s+/g, ' ')
|
||||||
.trim() || undefined
|
.trim() || undefined
|
||||||
: undefined,
|
: undefined,
|
||||||
alwaysLoad: tool._meta?.['anthropic/alwaysLoad'] === true,
|
alwaysLoad: tool._meta?.['anthropic/alwaysLoad'] === true,
|
||||||
async description() {
|
async description() {
|
||||||
@@ -1871,11 +1871,11 @@ export const fetchToolsForClient = memoizeWithLRU(
|
|||||||
onProgress:
|
onProgress:
|
||||||
onProgress && toolUseId
|
onProgress && toolUseId
|
||||||
? progressData => {
|
? progressData => {
|
||||||
onProgress({
|
onProgress({
|
||||||
toolUseID: toolUseId,
|
toolUseID: toolUseId,
|
||||||
data: progressData,
|
data: progressData,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
handleElicitation: context.handleElicitation,
|
handleElicitation: context.handleElicitation,
|
||||||
})
|
})
|
||||||
@@ -1975,14 +1975,14 @@ export const fetchToolsForClient = memoizeWithLRU(
|
|||||||
return `${client.name} - ${displayName} (MCP)`
|
return `${client.name} - ${displayName} (MCP)`
|
||||||
},
|
},
|
||||||
...(isClaudeInChromeMCPServer(client.name) &&
|
...(isClaudeInChromeMCPServer(client.name) &&
|
||||||
(client.config.type === 'stdio' || !client.config.type)
|
(client.config.type === 'stdio' || !client.config.type)
|
||||||
? claudeInChromeToolRendering().getClaudeInChromeMCPToolOverrides(
|
? claudeInChromeToolRendering().getClaudeInChromeMCPToolOverrides(
|
||||||
tool.name,
|
tool.name,
|
||||||
)
|
)
|
||||||
: {}),
|
: {}),
|
||||||
...(feature('CHICAGO_MCP') &&
|
...(feature('CHICAGO_MCP') &&
|
||||||
(client.config.type === 'stdio' || !client.config.type) &&
|
(client.config.type === 'stdio' || !client.config.type) &&
|
||||||
isComputerUseMCPServer!(client.name)
|
isComputerUseMCPServer!(client.name)
|
||||||
? computerUseWrapper!().getComputerUseMCPToolOverrides(tool.name)
|
? computerUseWrapper!().getComputerUseMCPToolOverrides(tool.name)
|
||||||
: {}),
|
: {}),
|
||||||
}
|
}
|
||||||
@@ -2876,9 +2876,9 @@ export async function callMCPToolWithUrlElicitationRetry({
|
|||||||
const errorData = error.data
|
const errorData = error.data
|
||||||
const rawElicitations =
|
const rawElicitations =
|
||||||
errorData != null &&
|
errorData != null &&
|
||||||
typeof errorData === 'object' &&
|
typeof errorData === 'object' &&
|
||||||
'elicitations' in errorData &&
|
'elicitations' in errorData &&
|
||||||
Array.isArray(errorData.elicitations)
|
Array.isArray(errorData.elicitations)
|
||||||
? (errorData.elicitations as unknown[])
|
? (errorData.elicitations as unknown[])
|
||||||
: []
|
: []
|
||||||
|
|
||||||
@@ -3101,16 +3101,16 @@ async function callMCPTool({
|
|||||||
timeout: timeoutMs,
|
timeout: timeoutMs,
|
||||||
onprogress: onProgress
|
onprogress: onProgress
|
||||||
? sdkProgress => {
|
? sdkProgress => {
|
||||||
onProgress({
|
onProgress({
|
||||||
type: 'mcp_progress',
|
type: 'mcp_progress',
|
||||||
status: 'progress',
|
status: 'progress',
|
||||||
serverName: name,
|
serverName: name,
|
||||||
toolName: tool,
|
toolName: tool,
|
||||||
progress: sdkProgress.progress,
|
progress: sdkProgress.progress,
|
||||||
total: sdkProgress.total,
|
total: sdkProgress.total,
|
||||||
progressMessage: sdkProgress.message,
|
progressMessage: sdkProgress.message,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user