fix(lint): clear error-level violations across runtime and ui

This commit is contained in:
William Valentin
2026-02-23 16:51:44 -08:00
parent 49fd2b5327
commit 0bf69acafe
10 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ export class NativeAgent {
this.modelClient.clearAbort(); this.modelClient.clearAbort();
} }
this._runInProgress = true; this._runInProgress = true;
return await this._runContext.run({ turnAudioInput: normalizedTurnAudioInput }, async () => { return this._runContext.run({ turnAudioInput: normalizedTurnAudioInput }, async () => {
// Detect and strip !!think prefix for per-message thinking mode // Detect and strip !!think prefix for per-message thinking mode
try { try {
if (userMessage.startsWith('!!think ') || userMessage === '!!think') { if (userMessage.startsWith('!!think ') || userMessage === '!!think') {
+1 -1
View File
@@ -1897,7 +1897,7 @@ describe('skills CLI helpers', () => {
process.exitCode = undefined; process.exitCode = undefined;
await program.parseAsync(['skills', 'registry', 'list', '--source', 'http://registry.example/catalog.json'], { from: 'user' }); await program.parseAsync(['skills', 'registry', 'list', '--source', 'http://registry.example/catalog.json'], { from: 'user' });
expect(errorSpy).toHaveBeenCalledWith("Registry URL must use https:// (http://registry.example/catalog.json)"); expect(errorSpy).toHaveBeenCalledWith('Registry URL must use https:// (http://registry.example/catalog.json)');
expect(process.exitCode).toBe(1); expect(process.exitCode).toBe(1);
errorSpy.mockClear(); errorSpy.mockClear();
+1 -1
View File
@@ -50,7 +50,7 @@ function createRuntimeMock(): {
lastDisconnectCode: number | undefined; lastDisconnectCode: number | undefined;
lastDisconnectReason: string | undefined; lastDisconnectReason: string | undefined;
connected: boolean; connected: boolean;
} { } {
const connect = vi.fn(async () => undefined); const connect = vi.fn(async () => undefined);
const disconnect = vi.fn(() => undefined); const disconnect = vi.fn(() => undefined);
const dispose = vi.fn(() => undefined); const dispose = vi.fn(() => undefined);
+1 -1
View File
@@ -86,7 +86,7 @@ async function fetchJson(url: string, headers?: Record<string, string>): Promise
if (!response.ok) { if (!response.ok) {
throw new Error(`${response.status} ${response.statusText}`); throw new Error(`${response.status} ${response.statusText}`);
} }
return await response.json(); return response.json();
} }
async function fetchProviderModels(provider: ModelProvider, cfg?: ModelConfig): Promise<string[]> { async function fetchProviderModels(provider: ModelProvider, cfg?: ModelConfig): Promise<string[]> {
+9 -3
View File
@@ -100,9 +100,15 @@ export function initStatusIndicator() {
const text = textMap[status] || 'Disconnected'; const text = textMap[status] || 'Disconnected';
const color = colorMap[status] || 'bg-zinc-600'; const color = colorMap[status] || 'bg-zinc-600';
if (connText) connText.textContent = text; if (connText) {
if (connDot) connDot.className = `${baseDotClasses} ${color}`; connText.textContent = text;
if (connDotMobile) connDotMobile.className = `${baseDotClasses} ${color}`; }
if (connDot) {
connDot.className = `${baseDotClasses} ${color}`;
}
if (connDotMobile) {
connDotMobile.className = `${baseDotClasses} ${color}`;
}
} }
client.onStatusChange((status) => { client.onStatusChange((status) => {
+2
View File
@@ -1,3 +1,5 @@
/* global caches, Notification */
function readGatewayToken() { function readGatewayToken() {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
const token = params.get('token'); const token = params.get('token');
+2
View File
@@ -1,3 +1,5 @@
/* global self, caches, URL, Response */
const CACHE_NAME = 'flynn-webchat-v5'; const CACHE_NAME = 'flynn-webchat-v5';
const token = new URL(self.location.href).searchParams.get('token'); const token = new URL(self.location.href).searchParams.get('token');
const withToken = (path) => { const withToken = (path) => {
+1 -1
View File
@@ -107,7 +107,7 @@ async function fetchRegistryJson(url: string, opts: SkillRegistryLoadOptions): P
throw new Error(`Registry fetch failed: HTTP ${response.status}`); throw new Error(`Registry fetch failed: HTTP ${response.status}`);
} }
return await response.json(); return response.json();
} }
export async function loadSkillRegistryCatalog( export async function loadSkillRegistryCatalog(
+1 -1
View File
@@ -298,7 +298,7 @@ function truncateForError(text: string, max = 180): string {
async function readResponseBody(response: Response): Promise<string> { async function readResponseBody(response: Response): Promise<string> {
const textReader = response.text as unknown; const textReader = response.text as unknown;
if (typeof textReader === 'function') { if (typeof textReader === 'function') {
return await response.text(); return response.text();
} }
const maybeJsonResponse = response as unknown as { json?: () => Promise<unknown> }; const maybeJsonResponse = response as unknown as { json?: () => Promise<unknown> };
+1 -1
View File
@@ -216,7 +216,7 @@ export function createMinioSyncTool(config: BackupConfig, store: MemoryStore, de
return { return {
success: true, success: true,
output: [ output: [
`MinIO sync completed.`, 'MinIO sync completed.',
`Prefix: minio://${bucket}/${prefix}`, `Prefix: minio://${bucket}/${prefix}`,
`Scanned: ${selected.length} object(s)`, `Scanned: ${selected.length} object(s)`,
`Imported: ${imported}`, `Imported: ${imported}`,