style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -18,7 +18,10 @@ import type {
NormalizedUserMessage,
} from '../types/message.js'
import { PERMISSION_MODES } from '../types/permissions.js'
import { suppressNextSkillDiscovery, suppressNextSkillListing } from './attachments.js'
import {
suppressNextSkillDiscovery,
suppressNextSkillListing,
} from './attachments.js'
import {
copyFileHistoryForResume,
type FileHistorySnapshot,
@@ -320,7 +323,10 @@ function detectTurnInterruption(
return { kind: 'interrupted_turn' }
}
// Plain text user prompt — CC hadn't started responding
return { kind: 'interrupted_prompt', message: lastMessage as NormalizedUserMessage }
return {
kind: 'interrupted_prompt',
message: lastMessage as NormalizedUserMessage,
}
}
if (lastMessage.type === 'attachment') {
@@ -362,7 +368,13 @@ function isTerminalToolResult(
const msgContent = msg.message!.content
if (!Array.isArray(msgContent)) continue
for (const b of msgContent) {
if (typeof b !== 'string' && 'type' in b && b.type === 'tool_use' && 'id' in b && b.id === toolUseId) {
if (
typeof b !== 'string' &&
'type' in b &&
b.type === 'tool_use' &&
'id' in b &&
b.id === toolUseId
) {
return (
('name' in b ? b.name : undefined) === BRIEF_TOOL_NAME ||
('name' in b ? b.name : undefined) === LEGACY_BRIEF_TOOL_NAME ||
@@ -387,7 +399,11 @@ export function restoreSkillStateFromMessages(messages: Message[]): void {
continue
}
if (message.attachment!.type === 'invoked_skills') {
const skills = message.attachment!.skills as Array<{ name?: string; path?: string; content?: string }>;
const skills = message.attachment!.skills as Array<{
name?: string
path?: string
content?: string
}>
for (const skill of skills) {
if (skill.name && skill.path && skill.content) {
// Resume only happens for the main session, so agentId is null