Files
zeekay 421a1bdd60 feat(jupyter): Hanzo AI for JupyterLab — side panel + cell actions
@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.
2026-07-03 21:27:08 -07:00

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'],
},
});