Commit graph

89 commits

Author SHA1 Message Date
Mario Zechner
c3d8eaff68 chore: bump version to 0.7.5 2025-11-13 01:31:21 +01:00
Mario Zechner
c8d762833a chore: bump version to 0.7.4 2025-11-13 01:30:26 +01:00
Mario Zechner
adbe47c255 chore: bump version to 0.7.3 2025-11-13 01:29:42 +01:00
Mario Zechner
39e22f1294 chore: bump versions to 0.7.2 2025-11-13 01:00:22 +01:00
Mario Zechner
4019acf1f0 chore: bump versions to 0.7.1 2025-11-13 00:05:09 +01:00
Mario Zechner
b1410ef903 chore: bump versions to 0.7.0 2025-11-12 23:54:57 +01:00
Mario Zechner
60cea11f37 chore: bump versions to 0.6.3 2025-11-12 23:51:08 +01:00
Mario Zechner
43a1c1ae44 chore: sync all versions to 0.6.2 and fix workspace references 2025-11-12 23:44:05 +01:00
Mario Zechner
88c65a7007 chore: bump versions to 0.6.1/0.6.2 2025-11-12 23:40:42 +01:00
Mario Zechner
68092ccf01 Add --mode flag for CLI output control (text/json/rpc)
- text mode: only outputs final assistant message text (default)
- json mode: streams all events as JSON (same as session manager writes)
- rpc mode: JSON output + listens for JSON input on stdin for headless operation
- Suppress informational messages in json/rpc modes
2025-11-12 20:33:31 +01:00
Mario Zechner
e533aebacd Fix Lit dependency duplication and update mini-lit to 0.2.0
- Move lit from dependencies to peerDependencies in web-ui to prevent multiple Lit instances being loaded
- Update mini-lit from 0.1.8/0.1.10 to 0.2.0 in root package.json and web-ui/package.json
- Install @tailwindcss/vite in web-ui/example
- Run biome formatting fixes across codebase

This resolves HMR custom element re-registration errors caused by duplicate Lit registries.
2025-11-12 16:03:43 +01:00
Mario Zechner
8be2613417 Fix version sync script to update all internal dependencies 2025-11-12 14:41:40 +01:00
Mario Zechner
09564f2940 Update coding-agent dependencies to 0.6.0 2025-11-12 14:36:59 +01:00
Mario Zechner
00d8286523 Handle FinishReason.NO_IMAGE and fix optional chaining
- Add NO_IMAGE to error finish reasons in Google provider
- Fix non-null assertion after optional chaining in Anthropic provider
- Migrate biome config to 2.3.5
- Ignore Tailwind CSS file from biome checks
- Bump all packages to version 0.6.0
2025-11-12 10:58:03 +01:00
Mario Zechner
c5083bb7cb Fix markdown streaming duplication by splitting newlines first
- Added string-width library for proper terminal column width calculation
- Fixed wrapLine() to split by newlines before wrapping (like Text component)
- Fixed Loader interval leak by stopping before container removal
- Changed loader message from 'Loading...' to 'Working...'
2025-11-11 19:27:58 +01:00
Mario Zechner
985f955ea0 Clean up TUI package and refactor component structure
- Remove old TUI implementation and components (LoadingAnimation, MarkdownComponent, TextComponent, TextEditor, WhitespaceComponent)
- Rename components-new to components with new API (Loader, Markdown, Text, Editor, Spacer)
- Move Text and Input components to separate files in src/components/
- Add render caching to Text component (similar to Markdown)
- Add proper ANSI code handling in Text component using stripVTControlCharacters
- Update coding-agent to use new TUI API (requires ProcessTerminal, uses custom Editor subclass for key handling)
- Remove old test files, keep only chat-simple.ts and virtual-terminal.ts
- Update README.md with new minimal API documentation
- Switch from tsc to tsgo for type checking
- Update package dependencies across monorepo
2025-11-11 10:32:18 +01:00
Mario Zechner
1f9a3a00cc Custom provider WIP 2025-11-10 21:47:21 +01:00
Mario Zechner
ec50ede6c2 Release 0.5.48 2025-10-26 21:23:06 +01:00
Mario Zechner
e31973218e 0.0.2 2025-10-26 21:22:43 +01:00
Mario Zechner
23be934a9a Relesae 0.5.47 2025-10-26 00:45:52 +02:00
Mario Zechner
ef09efaac9 Fix XLSX dependency 2025-10-22 13:09:18 +02:00
Mario Zechner
a94b19e1df Fix dependencies 2025-10-22 13:05:24 +02:00
Mario Zechner
2a7ccf0fcb Updates to prompts 2025-10-17 22:44:03 +02:00
Mario Zechner
ffc9be8867 Agent package + coding agent WIP, refactored web-ui prompts 2025-10-17 11:47:01 +02:00
Mario Zechner
f93e72a805 Committing manually like the monkey I am 2025-10-12 02:59:46 +02:00
Mario Zechner
91c1dc6475 Add ollama dependency and dialog backdrop blur
- Add ollama package to web-ui dependencies for ModelSelector
- Add backdrop blur to SettingsDialog (bg-black/50 backdrop-blur-sm)
- Update mini-lit to 0.1.9 for backdropClassName prop support
- Fix TypeScript errors in ModelSelector (ollama import, parameter types)
- Add backward compatibility methods to SessionsStore (saveSession, loadSession, getLatestSessionId)
2025-10-08 17:49:56 +02:00
Mario Zechner
33145c5f24 Make mini-lit a peer dependency in pi-web-ui
- Move mini-lit from dependencies to peerDependencies
- Keep in devDependencies for development
- Prevents bundlers from including mini-lit when consuming pi-web-ui
- Consumer (sitegeist) provides mini-lit, esbuild bundles it once
- Fixes duplicate mini-lit bundling issue permanently
2025-10-06 18:59:08 +02:00
Mario Zechner
6126380879 Update package-lock.json after mini-lit version changes 2025-10-06 18:51:34 +02:00
Mario Zechner
414a4eb8fd Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
Mario Zechner
0496651308 Add Anthropic prompt caching, pluggable storage, and CORS proxy support
Storage Architecture:
- New pluggable storage system with backends (LocalStorage, ChromeStorage, IndexedDB)
- SettingsRepository for app settings (proxy config, etc.)
- ProviderKeysRepository for API key management
- AppStorage with global accessors (getAppStorage, setAppStorage, initAppStorage)

Transport Refactoring:
- Renamed DirectTransport → ProviderTransport (calls LLM providers with optional CORS proxy)
- Renamed ProxyTransport → AppTransport (uses app server with user auth)
- Updated TransportMode: "direct" → "provider", "proxy" → "app"

CORS Proxy Integration:
- ProviderTransport checks proxy.enabled/proxy.url from storage
- When enabled, modifies model baseUrl to route through proxy: {proxyUrl}/?url={originalBaseUrl}
- ProviderKeyInput test function also honors proxy settings
- Settings dialog with Proxy tab (Switch toggle, URL input, explanatory description)

Anthropic Prompt Caching:
- System prompt cached with cache_control markers (both OAuth and regular API keys)
- Last user message cached to cache conversation history
- Saves 90% on input tokens for cached content (10x cost reduction)

Settings Dialog Improvements:
- Configurable tab system with SettingsTab base class
- ApiKeysTab and ProxyTab as custom elements
- Switch toggle for proxy enable (instead of Checkbox)
- Explanatory paragraphs for each tab
- ApiKeyPromptDialog reuses ProviderKeyInput component

Removed:
- Deprecated ApiKeysDialog (replaced by ProviderKeyInput in SettingsDialog)
- Old storage-adapter and key-store (replaced by new storage architecture)
2025-10-05 23:00:36 +02:00
Mario Zechner
66f092c0c6 Proxy package 2025-10-05 19:02:15 +02:00
Mario Zechner
aaea0f4600 Integrate JailJS for CSP-restricted execution in browser extension
Major changes:
- Migrate browser-extension to use web-ui package (85% code reduction)
- Add JailJS content script with ES6+ transform support
- Expose DOM constructors (Event, KeyboardEvent, etc.) to JailJS
- Support top-level await by wrapping code in async IIFE
- Add returnFile() support in JailJS execution
- Refactor KeyStore into pluggable storage-adapter pattern
- Make ChatPanel configurable with sandboxUrlProvider and additionalTools
- Update jailjs to 0.1.1

Files deleted (33 duplicate files):
- All browser-extension components, dialogs, state, tools, utils
- Now using web-ui versions via @mariozechner/pi-web-ui

Files added:
- packages/browser-extension/src/content.ts (JailJS content script)
- packages/web-ui/src/state/storage-adapter.ts
- packages/web-ui/src/state/key-store.ts

Browser extension now has only 5 source files (down from 38).
2025-10-05 16:58:31 +02:00
Mario Zechner
f2eecb78d2 web-ui package 2025-10-05 13:30:08 +02:00
Mario Zechner
9d6267a915 Fix javascript-repl renderer to use console-block component 2025-10-04 21:44:23 +02:00
Mario Zechner
99983af597 Fix lints. 2025-10-03 23:21:59 +02:00
Mario Zechner
0e932a97df More browser extension work, disable ajv validation in browser extensions, it uses eval/new Function, which is not allowed in manifest v3 extensions 2025-10-01 20:30:49 +02:00
Mario Zechner
b3a7b35ec5 Port PDF/Office support, message editor, overlays, key setter 2025-10-01 17:31:13 +02:00
Mario Zechner
b67c10dfb1 feat: add cross-browser extension with AI reading assistant
- Create Pi Reader browser extension for Chrome/Firefox
- Chrome uses Side Panel API, Firefox uses Sidebar Action API
- Supports both browsers with separate manifests and unified codebase
- Built with mini-lit components and Tailwind CSS v4
- Features model selection dialog with Ollama support
- Hot reload development server watches both browser builds
- Add useDefineForClassFields: false to fix LitElement reactivity
2025-10-01 04:33:56 +02:00
Mario Zechner
c1185c7b95 chore: bump version to 0.5.43 2025-09-19 01:49:46 +02:00
Mario Zechner
0f7ed33ba5 chore: bump version to 0.5.42 2025-09-19 00:14:23 +02:00
Mario Zechner
293a6e878d chore: bump version to 0.5.41 2025-09-18 11:18:02 +02:00
Mario Zechner
9c921049a6 chore: bump version to 0.5.40 2025-09-16 12:24:00 +02:00
Mario Zechner
39c626b6c9 feat(ai): add partial JSON parsing for streaming tool calls
- Added partial-json package for parsing incomplete JSON during streaming
- Tool call arguments now contain partially parsed JSON during toolcall_delta events
- Enables progressive UI updates (e.g., showing file paths before content is complete)
- Arguments are always valid objects (minimum empty {}), never undefined
- Full validation still occurs at toolcall_end when arguments are complete
- Updated all providers (Anthropic, OpenAI Completions/Responses) to use parseStreamingJson
- Added comprehensive documentation and examples in README
- Added test to verify arguments are always defined during streaming
2025-09-16 12:23:34 +02:00
Mario Zechner
197259c88a Fix NodeJS compat 2025-09-16 02:19:47 +02:00
Mario Zechner
365b9ec390 chore: bump version to 0.5.36 2025-09-16 01:11:28 +02:00
Mario Zechner
f5ac1ef521 chore: bump version to 0.5.35 2025-09-15 20:32:50 +02:00
Mario Zechner
1c9ab1ca24 chore: bump version to 0.5.34 2025-09-15 00:35:10 +02:00
Mario Zechner
8f50f7cc79 0.0.1 2025-09-09 14:59:11 +02:00
Mario Zechner
35fe8f21e9 feat(ai): Implement Zod-based tool validation and improve Agent API
- Replace JSON Schema with Zod schemas for tool parameter definitions
- Add runtime validation for all tool calls at provider level
- Create shared validation module with detailed error formatting
- Update Agent API with comprehensive event system
- Add agent tests with calculator tool for multi-turn execution
- Add abort test to verify proper handling of aborted requests
- Update documentation with detailed event flow examples
- Rename generate.ts to stream.ts for clarity
2025-09-09 14:58:54 +02:00
Mario Zechner
2bdb87dfe7 chore: bump version to 0.5.31 2025-09-07 00:09:34 +02:00