style: auto-fix ESLint issues (curly braces and formatting)
- Add curly braces to all if/else/for/while statements - Fix indentation and trailing spaces - Auto-fixed 372 linting errors using eslint --fix - Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
@@ -21,9 +21,9 @@ function formatToolName(name: string): string {
|
||||
|
||||
/** Format tool args as a compact, readable summary. */
|
||||
function formatToolArgs(args: unknown): string {
|
||||
if (!args || typeof args !== 'object') return '';
|
||||
if (!args || typeof args !== 'object') {return '';}
|
||||
const entries = Object.entries(args as Record<string, unknown>);
|
||||
if (entries.length === 0) return '';
|
||||
if (entries.length === 0) {return '';}
|
||||
const parts = entries.map(([key, value]) => {
|
||||
if (typeof value === 'string') {
|
||||
const display = value.length > 50 ? value.slice(0, 47) + '...' : value;
|
||||
@@ -71,7 +71,7 @@ export function App({
|
||||
// This replaces the process.stdout.write callback (which corrupts Ink rendering)
|
||||
// with one that updates React state to show tool activity in the streaming area.
|
||||
useEffect(() => {
|
||||
if (!agent) return;
|
||||
if (!agent) {return;}
|
||||
|
||||
const handleToolEvent = (event: ToolUseEvent) => {
|
||||
if (event.type === 'start') {
|
||||
@@ -137,7 +137,7 @@ export function App({
|
||||
|
||||
const handleSubmit = useCallback(async (value: string) => {
|
||||
const command = parseCommand(value);
|
||||
if (!command) return;
|
||||
if (!command) {return;}
|
||||
|
||||
setInput('');
|
||||
|
||||
@@ -212,7 +212,7 @@ export function App({
|
||||
return;
|
||||
|
||||
case 'transfer': {
|
||||
const xferMsg: Message = { role: 'assistant', content: `Transfer not supported in fullscreen mode.` };
|
||||
const xferMsg: Message = { role: 'assistant', content: 'Transfer not supported in fullscreen mode.' };
|
||||
const xferWithTs = session.addMessage(xferMsg);
|
||||
setMessages(prev => [...prev, xferWithTs]);
|
||||
return;
|
||||
@@ -222,7 +222,7 @@ export function App({
|
||||
break; // Continue to message handling
|
||||
}
|
||||
|
||||
if (command.type !== 'message' || isStreaming) return;
|
||||
if (command.type !== 'message' || isStreaming) {return;}
|
||||
|
||||
// Add user message to UI (and session if no agent — agent adds it internally)
|
||||
const userMessage: Message = { role: 'user', content: command.content };
|
||||
|
||||
Reference in New Issue
Block a user