chore(ai): drop unused eslint-disable around suppressed SDK warning (#1111)
Some checks failed
build-packages / dedupe push run (push) Has been cancelled
build-packages / dedupe result (push) Has been cancelled
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / ${{ needs.dedupe.outputs.skip_heavy_ci == 'true' && 'deduped build-linux-x64' || 'build-linux-x64' }} (push) Has been cancelled
build-packages / ${{ needs.dedupe.outputs.skip_heavy_ci == 'true' && 'deduped build-linux-arm64' || 'build-linux-arm64' }} (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled

PR #1110 added an \`// eslint-disable-next-line no-console\` above
\`console.warn\` when suppressing SDK reasoning/text state-machine
errors, but this file already permits \`console.*\` calls (there are
several pre-existing \`console.error\` lines in the same hook) so the
directive is unused and ESLint flags it:

\`\`\`
666:13  warning  Unused eslint-disable directive (no problems were
reported from 'no-console')
\`\`\`

Removes the directive; the \`console.warn\` stays.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
陈大猫
2026-05-27 01:29:33 +08:00
committed by GitHub
parent 5be9bb58df
commit 46d1cf1696

View File

@@ -663,7 +663,6 @@ export function useAIChatStreaming({
// accepting subsequent chunks, so the rest of the stream // accepting subsequent chunks, so the rest of the stream
// (real text, tool calls, the genuine `finish`) lands intact. // (real text, tool calls, the genuine `finish`) lands intact.
if (isSdkStreamStateError(typedChunk.error)) { if (isSdkStreamStateError(typedChunk.error)) {
// eslint-disable-next-line no-console
console.warn('[Catty] suppressed SDK stream state error:', typedChunk.error); console.warn('[Catty] suppressed SDK stream state error:', typedChunk.error);
break; break;
} }