mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-19 06:45:50 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
export const mockStreamResponse = {
|
||||
type: "message_start" as const,
|
||||
type: 'message_start' as const,
|
||||
message: {
|
||||
id: "msg_mock_001",
|
||||
type: "message" as const,
|
||||
role: "assistant",
|
||||
id: 'msg_mock_001',
|
||||
type: 'message' as const,
|
||||
role: 'assistant',
|
||||
content: [],
|
||||
model: "claude-sonnet-4-20250514",
|
||||
model: 'claude-sonnet-4-20250514',
|
||||
stop_reason: null,
|
||||
stop_sequence: null,
|
||||
usage: { input_tokens: 100, output_tokens: 0 },
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const mockTextBlock = {
|
||||
type: "content_block_start" as const,
|
||||
type: 'content_block_start' as const,
|
||||
index: 0,
|
||||
content_block: { type: "text" as const, text: "Mock response" },
|
||||
};
|
||||
content_block: { type: 'text' as const, text: 'Mock response' },
|
||||
}
|
||||
|
||||
export const mockToolUseBlock = {
|
||||
type: "content_block_start" as const,
|
||||
type: 'content_block_start' as const,
|
||||
index: 1,
|
||||
content_block: {
|
||||
type: "tool_use" as const,
|
||||
id: "toolu_mock_001",
|
||||
name: "Read",
|
||||
input: { file_path: "/tmp/test.txt" },
|
||||
type: 'tool_use' as const,
|
||||
id: 'toolu_mock_001',
|
||||
name: 'Read',
|
||||
input: { file_path: '/tmp/test.txt' },
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const mockEndEvent = {
|
||||
type: "message_stop" as const,
|
||||
};
|
||||
type: 'message_stop' as const,
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
export function debugMock() {
|
||||
return {
|
||||
getMinDebugLogLevel: () => "debug" as const,
|
||||
getMinDebugLogLevel: () => 'debug' as const,
|
||||
isDebugMode: () => false,
|
||||
enableDebugLogging: () => false,
|
||||
getDebugFilter: () => null,
|
||||
@@ -19,7 +19,7 @@ export function debugMock() {
|
||||
getHasFormattedOutput: () => false,
|
||||
flushDebugLogs: async () => {},
|
||||
logForDebugging: () => {},
|
||||
getDebugLogPath: () => "/tmp/mock-debug.log",
|
||||
getDebugLogPath: () => '/tmp/mock-debug.log',
|
||||
logAntError: () => {},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
},
|
||||
"assistantMessage": {
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{ "type": "text", "text": "Hello! How can I help?" }
|
||||
]
|
||||
"content": [{ "type": "text", "text": "Hello! How can I help?" }]
|
||||
},
|
||||
"toolUseMessage": {
|
||||
"role": "assistant",
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
export function logMock() {
|
||||
return {
|
||||
logError: () => {},
|
||||
getLogDisplayTitle: () => "",
|
||||
dateToFilename: (d: Date) => d.toISOString().replace(/[:.]/g, "-"),
|
||||
getLogDisplayTitle: () => '',
|
||||
dateToFilename: (d: Date) => d.toISOString().replace(/[:.]/g, '-'),
|
||||
attachErrorLogSink: () => {},
|
||||
getInMemoryErrors: () => [] as Array<{ error: string; timestamp: string }>,
|
||||
loadErrorLogs: async () => [],
|
||||
|
||||
Reference in New Issue
Block a user