style: make new files lint-clean (prettier + eqeqeq + remove unused eslint-disables)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-23 10:52:10 +08:00
co-authored by Claude Fable 5
parent fe45c80dd2
commit 47a774f237
5 changed files with 49 additions and 19 deletions
+14 -4
View File
@@ -79,15 +79,25 @@ function makeFakeCell(
content: notebook
};
for (let i = 0; i < cellIndex; i++) {
notebook.widgets.push({ model: { sharedModel: { getSource: () => '' } } } as any);
notebook.widgets.push({
model: { sharedModel: { getSource: () => '' } }
} as any);
}
notebook.widgets.push(cell);
for (let i = cellIndex + 1; i < totalCells; i++) {
notebook.widgets.push({ model: { sharedModel: { getSource: () => '' } } } as any);
notebook.widgets.push({
model: { sharedModel: { getSource: () => '' } }
} as any);
}
Object.defineProperty(cell, 'parent', { value: notebook, configurable: true });
Object.defineProperty(notebook, 'parent', { value: panel, configurable: true });
Object.defineProperty(cell, 'parent', {
value: notebook,
configurable: true
});
Object.defineProperty(notebook, 'parent', {
value: panel,
configurable: true
});
return cell as CodeCell;
}
+1 -1
View File
@@ -68,7 +68,7 @@ export class OpenCodeCellActions extends Widget {
const node = this.node;
node.textContent = '';
const hasError = this._context?.error != null;
const hasError = !!this._context?.error;
const loading = this._status === 'loading';
const baseDisabled = !this._context || loading;
+3 -3
View File
@@ -61,16 +61,16 @@ const plugin: JupyterFrontEndPlugin<void> = {
void callOpenCodeProviders(app.serviceManager.serverSettings)
.then(data => {
const lines: string[] = ['[opencode_bridge] Available OpenCode providers:'];
const lines: string[] = [
'[opencode_bridge] Available OpenCode providers:'
];
for (const p of data.providers) {
const models = p.models.map(m => m.id).join(', ');
lines.push(` - ${p.id}: ${models || '(no models)'}`);
}
// eslint-disable-next-line no-console
console.log(lines.join('\n'));
})
.catch(reason => {
// eslint-disable-next-line no-console
console.warn(
'[opencode_bridge] Could not fetch providers (is the opencode-bridge server extension enabled and opencode serve running?):',
reason