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

@@ -1,44 +1,36 @@
import { feature } from 'bun:bundle'
import { spawnSync } from 'child_process'
import sample from 'lodash-es/sample.js'
import * as React from 'react'
import { ExitFlow } from '../../components/ExitFlow.js'
import type { LocalJSXCommandOnDone } from '../../types/command.js'
import { isBgSession } from '../../utils/concurrentSessions.js'
import { gracefulShutdown } from '../../utils/gracefulShutdown.js'
import { getCurrentWorktreeSession } from '../../utils/worktree.js'
import { feature } from 'bun:bundle';
import { spawnSync } from 'child_process';
import sample from 'lodash-es/sample.js';
import * as React from 'react';
import { ExitFlow } from '../../components/ExitFlow.js';
import type { LocalJSXCommandOnDone } from '../../types/command.js';
import { isBgSession } from '../../utils/concurrentSessions.js';
import { gracefulShutdown } from '../../utils/gracefulShutdown.js';
import { getCurrentWorktreeSession } from '../../utils/worktree.js';
const GOODBYE_MESSAGES = ['Goodbye!', 'See ya!', 'Bye!', 'Catch you later!']
const GOODBYE_MESSAGES = ['Goodbye!', 'See ya!', 'Bye!', 'Catch you later!'];
function getRandomGoodbyeMessage(): string {
return sample(GOODBYE_MESSAGES) ?? 'Goodbye!'
return sample(GOODBYE_MESSAGES) ?? 'Goodbye!';
}
export async function call(
onDone: LocalJSXCommandOnDone,
): Promise<React.ReactNode> {
export async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactNode> {
// Inside a `claude --bg` tmux session: detach instead of kill. The REPL
// keeps running; `claude attach` can reconnect. Covers /exit, /quit,
// ctrl+c, ctrl+d — all funnel through here via REPL's handleExit.
if (feature('BG_SESSIONS') && isBgSession()) {
onDone()
spawnSync('tmux', ['detach-client'], { stdio: 'ignore' })
return null
onDone();
spawnSync('tmux', ['detach-client'], { stdio: 'ignore' });
return null;
}
const showWorktree = getCurrentWorktreeSession() !== null
const showWorktree = getCurrentWorktreeSession() !== null;
if (showWorktree) {
return (
<ExitFlow
showWorktree={showWorktree}
onDone={onDone}
onCancel={() => onDone()}
/>
)
return <ExitFlow showWorktree={showWorktree} onDone={onDone} onCancel={() => onDone()} />;
}
onDone(getRandomGoodbyeMessage())
await gracefulShutdown(0, 'prompt_input_exit')
return null
onDone(getRandomGoodbyeMessage());
await gracefulShutdown(0, 'prompt_input_exit');
return null;
}