mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 16:55:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { LocalJSXCommandOnDone, LocalJSXCommandContext } from '../../types/command.js'
|
||||
import type { LocalJSXCommandOnDone, LocalJSXCommandContext } from '../../types/command.js';
|
||||
|
||||
/**
|
||||
* /job slash command — manages template jobs from inside the REPL.
|
||||
@@ -11,24 +11,24 @@ export async function call(
|
||||
_context: LocalJSXCommandContext,
|
||||
args: string,
|
||||
): Promise<React.ReactNode> {
|
||||
const parts = args ? args.trim().split(/\s+/) : []
|
||||
const sub = parts[0] || 'list'
|
||||
const parts = args ? args.trim().split(/\s+/) : [];
|
||||
const sub = parts[0] || 'list';
|
||||
|
||||
// Capture console output so we can return it as onDone text
|
||||
const lines: string[] = []
|
||||
const origLog = console.log
|
||||
const origError = console.error
|
||||
console.log = (...a: unknown[]) => lines.push(a.map(String).join(' '))
|
||||
console.error = (...a: unknown[]) => lines.push(a.map(String).join(' '))
|
||||
const lines: string[] = [];
|
||||
const origLog = console.log;
|
||||
const origError = console.error;
|
||||
console.log = (...a: unknown[]) => lines.push(a.map(String).join(' '));
|
||||
console.error = (...a: unknown[]) => lines.push(a.map(String).join(' '));
|
||||
|
||||
try {
|
||||
const { templatesMain } = await import('../../cli/handlers/templateJobs.js')
|
||||
await templatesMain([sub, ...parts.slice(1)])
|
||||
const { templatesMain } = await import('../../cli/handlers/templateJobs.js');
|
||||
await templatesMain([sub, ...parts.slice(1)]);
|
||||
} finally {
|
||||
console.log = origLog
|
||||
console.error = origError
|
||||
console.log = origLog;
|
||||
console.error = origError;
|
||||
}
|
||||
|
||||
onDone(lines.join('\n') || 'Done.', { display: 'system' })
|
||||
return null
|
||||
onDone(lines.join('\n') || 'Done.', { display: 'system' });
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user