mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 06:04:40 +00:00
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)
45 lines
1.3 KiB
JSON
45 lines
1.3 KiB
JSON
{
|
|
"name": "@mariozechner/pi-web-ui",
|
|
"version": "0.5.43",
|
|
"description": "Reusable web UI components for AI chat interfaces powered by @mariozechner/pi-ai",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./app.css": "./dist/app.css"
|
|
},
|
|
"scripts": {
|
|
"clean": "rm -rf dist",
|
|
"build": "tsc -p tsconfig.build.json && tailwindcss -i ./src/app.css -o ./dist/app.css --minify",
|
|
"dev": "concurrently --names \"build,example\" --prefix-colors \"cyan,green\" \"tsc -p tsconfig.build.json --watch\" \"tailwindcss -i ./src/app.css -o ./dist/app.css --watch\" \"npm run dev --prefix example\"",
|
|
"typecheck": "tsc --noEmit",
|
|
"check": "npm run typecheck"
|
|
},
|
|
"dependencies": {
|
|
"@mariozechner/mini-lit": "^0.1.8",
|
|
"@mariozechner/pi-ai": "^0.5.43",
|
|
"docx-preview": "^0.3.7",
|
|
"jszip": "^3.10.1",
|
|
"lit": "^3.3.1",
|
|
"lucide": "^0.544.0",
|
|
"pdfjs-dist": "^5.4.149",
|
|
"xlsx": "^0.18.5"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/cli": "^4.0.0-beta.14",
|
|
"concurrently": "^9.2.1",
|
|
"typescript": "^5.7.3"
|
|
},
|
|
"keywords": [
|
|
"ai",
|
|
"chat",
|
|
"ui",
|
|
"components",
|
|
"llm",
|
|
"web-components",
|
|
"mini-lit"
|
|
],
|
|
"author": "Mario Zechner",
|
|
"license": "MIT"
|
|
}
|