mirror of
https://github.com/hanzoai/extension.git
synced 2026-11-01 18:02:17 +00:00
@hanzo/jupyter: a JupyterLab 4 labextension. A side-panel assistant (model picker + prompt + streaming over @hanzo/ai) that reads active-cell / selection / whole-notebook context, plus cell actions (explain, fix from traceback, document, optimize, generate-a-cell). Model calls route through api.hanzo.ai /v1 via the published @hanzo/ai createAiClient; the hk- key lives in the JupyterLab settings registry (schema/plugin.json). Pure core (notebook.ts context/traceback/truncation, hanzo.ts action catalog + request shaping) is unit-tested with vitest (58 tests); the widget layer (index.ts plugin, panel.tsx) is the thin imperative shell. tsc --noEmit clean. Ships a hatch-jupyter-builder pyproject for pip install / PyPI.
15 lines
524 B
TypeScript
15 lines
524 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
// Only the pure modules are unit-tested (notebook.ts, hanzo.ts prompt/shaping,
|
|
// config.ts, and the stripFences helper from index.ts). The JupyterLab widget
|
|
// layer (panel.tsx / the plugin's activate) is integration-tested by running
|
|
// JupyterLab, not here — vitest runs in a plain node environment with no DOM
|
|
// and no @jupyterlab runtime.
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['test/**/*.test.ts'],
|
|
},
|
|
});
|