mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -109,7 +109,9 @@ export function createApiQueryHook<TResult>(
|
||||
})
|
||||
|
||||
// Parse response
|
||||
const content = extractTextContent(Array.isArray(response.message.content) ? response.message.content : []).trim()
|
||||
const content = extractTextContent(
|
||||
Array.isArray(response.message.content) ? response.message.content : [],
|
||||
).trim()
|
||||
|
||||
try {
|
||||
const result = config.parseResponse(content, context)
|
||||
|
||||
@@ -213,7 +213,9 @@ When done, return your result using the ${SYNTHETIC_OUTPUT_TOOL_NAME} tool with:
|
||||
message.type === 'attachment' &&
|
||||
(message as any).attachment.type === 'structured_output'
|
||||
) {
|
||||
const parsed = hookResponseSchema().safeParse((message as any).attachment.data)
|
||||
const parsed = hookResponseSchema().safeParse(
|
||||
(message as any).attachment.data,
|
||||
)
|
||||
if (parsed.success) {
|
||||
structuredOutputResult = parsed.data
|
||||
logForDebugging(
|
||||
|
||||
@@ -103,7 +103,9 @@ Your response must be a JSON object matching one of the following schemas:
|
||||
cleanupSignal()
|
||||
|
||||
// Extract text content from response
|
||||
const content = extractTextContent(Array.isArray(response.message.content) ? response.message.content : [])
|
||||
const content = extractTextContent(
|
||||
Array.isArray(response.message.content) ? response.message.content : [],
|
||||
)
|
||||
|
||||
// Update response length for spinner display
|
||||
toolUseContext.setResponseLength(length => length + content.length)
|
||||
|
||||
@@ -327,7 +327,7 @@ export function groupHooksByEventAndMatcher(
|
||||
const eventGroup = grouped[hookEvent]
|
||||
if (!eventGroup) continue
|
||||
|
||||
for (const matcher of (matchers ?? [])) {
|
||||
for (const matcher of matchers ?? []) {
|
||||
const matcherKey = matcher.matcher || ''
|
||||
|
||||
// Only PluginHookMatcher has pluginRoot; HookCallbackMatcher (internal
|
||||
|
||||
Reference in New Issue
Block a user