mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 20:58:14 -04:00
chore: remove unused core utility assignments (#2447)
This commit is contained in:
@@ -103,7 +103,6 @@ function stripNonCode(source: string): string {
|
||||
const end = source.indexOf('*/', i + 2)
|
||||
if (end === -1) {
|
||||
out += ' '.repeat(n - i)
|
||||
i = n
|
||||
break
|
||||
}
|
||||
// Replace with spaces, keep newlines so line numbers stay stable.
|
||||
|
||||
@@ -206,7 +206,7 @@ export function buildPermissionContext(options: PermissionContextOptions): ToolP
|
||||
}
|
||||
|
||||
// Map SDK permission mode to internal PermissionMode
|
||||
let internalMode: string = 'default'
|
||||
let internalMode: string
|
||||
switch (mode) {
|
||||
case 'plan':
|
||||
internalMode = 'plan'
|
||||
|
||||
@@ -245,7 +245,6 @@ export async function completeAimlapiCodeSignIn(
|
||||
const minted = await mintOrAdoptSignInKey(client, email, auth.token, signal)
|
||||
apiKey = minted.apiKey
|
||||
apiKeyId = minted.apiKeyId
|
||||
mintedKey = true
|
||||
try {
|
||||
const balance = await client.getBalance(apiKey, signal)
|
||||
return {
|
||||
|
||||
@@ -120,7 +120,7 @@ function resolveCurrentAnthropicAttributionAuth(): AnthropicAttributionAuth {
|
||||
// Missing credentials are an ambiguous state, not an error for policy.
|
||||
}
|
||||
|
||||
let authTokenSource: ReturnType<typeof getAuthTokenSource>['source'] = 'none'
|
||||
let authTokenSource: ReturnType<typeof getAuthTokenSource>['source']
|
||||
try {
|
||||
;({ source: authTokenSource } = getAuthTokenSource())
|
||||
} catch {
|
||||
|
||||
@@ -936,7 +936,7 @@ function skipNewlines(P: ParseState): void {
|
||||
* pipeline(a,|,b), 2>nul), |, c).
|
||||
*/
|
||||
function parsePipeline(P: ParseState): TsNode | null {
|
||||
let first = parseCommand(P)
|
||||
const first = parseCommand(P)
|
||||
if (!first) return null
|
||||
const parts: TsNode[] = [first]
|
||||
while (true) {
|
||||
@@ -977,7 +977,6 @@ function parsePipeline(P: ParseState): TsNode | null {
|
||||
)
|
||||
parts.length = 0
|
||||
parts.push(wrapped)
|
||||
first = wrapped
|
||||
continue
|
||||
}
|
||||
parts.push(op, next)
|
||||
|
||||
@@ -1660,7 +1660,7 @@ export function normalizeMessagesForAPI(
|
||||
// tool_result content, as these are only valid with the tool search beta.
|
||||
// When tool search IS enabled, strip only tool_reference blocks for
|
||||
// tools that no longer exist (e.g., MCP server was disconnected).
|
||||
let normalizedMessage = message
|
||||
let normalizedMessage: UserMessage
|
||||
if (!isToolSearchEnabledOptimistic()) {
|
||||
normalizedMessage = stripToolReferenceBlocksFromUserMessage(message)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user