diff --git a/src/fork-session.ts b/src/fork-session.ts index e2ee3450..64ffa058 100644 --- a/src/fork-session.ts +++ b/src/fork-session.ts @@ -216,7 +216,7 @@ async function forkTranscript( if (upToMessageId === undefined) { throw RequestError.invalidParams( { cursorId: params.cursorId }, - `Session ${params.sessionId} has no cursor ${params.cursorId} that a fork can start at. Use a cursor that the session announced with the \`fork\` capability, or send the request without \`cursorId\` to fork the whole session.`, + `Session ${params.sessionId} has no cursor ${params.cursorId} that a fork can start at. Use a cursor that the session announced with the fork capability, or send the request without cursorId to fork the whole session.`, ); } const forked = await forkClaudeSession(params.sessionId, { upToMessageId }); diff --git a/src/initial-config-options.ts b/src/initial-config-options.ts index 3a6ccd50..1d5f6390 100644 --- a/src/initial-config-options.ts +++ b/src/initial-config-options.ts @@ -28,7 +28,7 @@ export function initialConfigOptions( if (seen.has(configId)) { throw RequestError.invalidParams( { configId }, - `\`configOptions\` sets ${configId} more than once. Send one entry for each config option.`, + `configOptions sets ${configId} more than once. Send one entry for each config option.`, ); } seen.add(configId); diff --git a/src/providers.ts b/src/providers.ts index 212c51bd..fd20c003 100644 --- a/src/providers.ts +++ b/src/providers.ts @@ -300,13 +300,13 @@ export function validatedGatewayAuthRequest(params: AuthenticateRequest): Gatewa if (typeof gateway !== "object" || !isValidBaseUrl(gateway.baseUrl)) { throw RequestError.invalidParams( { baseUrl: (gateway as { baseUrl?: unknown }).baseUrl }, - "`_meta.gateway.baseUrl` must be a non-empty absolute http(s) URL.", + "_meta.gateway.baseUrl must be a non-empty absolute http(s) URL.", ); } if (gateway.headers !== undefined && typeof gateway.headers !== "object") { throw RequestError.invalidParams( undefined, - "`_meta.gateway.headers` must be an object of header names to values.", + "_meta.gateway.headers must be an object of header names to values.", ); } } @@ -395,7 +395,7 @@ export function providerConfigFromSetRequest(params: SetProviderRequest): Provid ) { throw RequestError.invalidParams( undefined, - "vertex apiType requires non-empty `_meta.claudeCode.vertex.projectId` and `_meta.claudeCode.vertex.region`.", + "vertex apiType requires non-empty _meta.claudeCode.vertex.projectId and _meta.claudeCode.vertex.region.", ); } config.vertex = { projectId: vertex.projectId, region: vertex.region }; diff --git a/src/session-index/service.ts b/src/session-index/service.ts index 75aaa786..064c7b15 100644 --- a/src/session-index/service.ts +++ b/src/session-index/service.ts @@ -138,7 +138,7 @@ function archivedFilter(list: Record): ArchivedFilter { if (!ARCHIVED_FILTERS.includes(value as ArchivedFilter)) { throw RequestError.invalidParams( { archived: value }, - '`_meta.jetbrains.air.list.archived` must be "unarchived", "archived" or "all"', + '_meta.jetbrains.air.list.archived must be "unarchived", "archived" or "all"', ); } return value as ArchivedFilter; @@ -150,7 +150,7 @@ function optionalBoolean(list: Record, key: string): boolean { if (typeof value !== "boolean") { throw RequestError.invalidParams( { [key]: value }, - `\`_meta.jetbrains.air.list.${key}\` must be a boolean`, + `_meta.jetbrains.air.list.${key} must be a boolean`, ); } return value; @@ -165,7 +165,7 @@ export function parseListOptions(meta: unknown): ListOptions { if (typeof raw !== "number" || !Number.isInteger(raw) || raw < 1) { throw RequestError.invalidParams( { limit: raw }, - "`_meta.jetbrains.air.list.limit` must be an integer of at least 1", + "_meta.jetbrains.air.list.limit must be an integer of at least 1", ); } return { diff --git a/src/v2/agent.ts b/src/v2/agent.ts index 9188782c..a505a21c 100644 --- a/src/v2/agent.ts +++ b/src/v2/agent.ts @@ -644,7 +644,7 @@ class V2Agent implements AgentHandle, SessionConnection { async listSessions(params: v2.ListSessionsRequest): Promise { if (params.cwd != null && !path.isAbsolute(params.cwd)) { - throw RequestError.invalidParams({ cwd: params.cwd }, "`cwd` must be an absolute path"); + throw RequestError.invalidParams({ cwd: params.cwd }, "cwd must be an absolute path"); } const offset = listOffset(params.cursor); // One more than a page tells whether a next page exists. @@ -1378,11 +1378,11 @@ async function validatedSetup( clientSystemPrompt(request.systemPrompt); const { cwd } = request; if (!path.isAbsolute(cwd)) { - throw RequestError.invalidParams({ cwd }, `\`cwd\` must be an absolute path, not ${cwd}`); + throw RequestError.invalidParams({ cwd }, `cwd must be an absolute path, not ${cwd}`); } const stat = await fs.stat(cwd).catch(() => undefined); if (!stat?.isDirectory()) { - throw RequestError.invalidParams({ cwd }, `\`cwd\` is not a directory: ${cwd}`); + throw RequestError.invalidParams({ cwd }, `cwd is not a directory: ${cwd}`); } for (const directory of request.additionalDirectories ?? []) { if (!path.isAbsolute(directory)) { @@ -1416,7 +1416,7 @@ function assertCwdOf(session: V2Session, cwd: string, action: string): void { if (cwd === session.cwd) return; throw RequestError.invalidParams( { cwd }, - `Session ${session.sessionId} works in ${session.cwd}: ${action} with that \`cwd\``, + `Session ${session.sessionId} works in ${session.cwd}: ${action} with that cwd`, ); } diff --git a/src/v2/prompt.ts b/src/v2/prompt.ts index 4662e095..47ed34a8 100644 --- a/src/v2/prompt.ts +++ b/src/v2/prompt.ts @@ -32,7 +32,7 @@ export function v1PromptRequest({ ...request }: v2.PromptRequest): PromptRequest { if (prompt.length === 0) { - throw RequestError.invalidParams({ prompt }, "`prompt` must hold at least one content block"); + throw RequestError.invalidParams({ prompt }, "prompt must hold at least one content block"); } return { ...request,