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:
@@ -27,12 +27,12 @@ function makeResponse(parts: unknown[], finishReason = 'STOP', usage = { promptT
|
||||
usageMetadata: usage,
|
||||
text: () => {
|
||||
const textParts = parts.filter((p: unknown) => typeof p === 'object' && p !== null && 'text' in p);
|
||||
if (textParts.length === 0) throw new Error('No text parts');
|
||||
if (textParts.length === 0) {throw new Error('No text parts');}
|
||||
return textParts.map((p: unknown) => (p as { text: string }).text).join('');
|
||||
},
|
||||
functionCalls: () => {
|
||||
const fcParts = parts.filter((p: unknown) => typeof p === 'object' && p !== null && 'functionCall' in p);
|
||||
if (fcParts.length === 0) return undefined;
|
||||
if (fcParts.length === 0) {return undefined;}
|
||||
return fcParts.map((p: unknown) => (p as { functionCall: { name: string; args: object } }).functionCall);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user