chore: migrate packages to earendil works scope
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# @mariozechner/pi-web-ui
|
||||
# @earendil-works/pi-web-ui
|
||||
|
||||
Reusable web UI components for building AI chat interfaces powered by [@mariozechner/pi-ai](../ai) and [@mariozechner/pi-agent-core](../agent).
|
||||
Reusable web UI components for building AI chat interfaces powered by [@earendil-works/pi-ai](../ai) and [@earendil-works/pi-agent-core](../agent).
|
||||
|
||||
Built with [mini-lit](https://github.com/badlogic/mini-lit) web components and Tailwind CSS v4.
|
||||
|
||||
@@ -17,7 +17,7 @@ Built with [mini-lit](https://github.com/badlogic/mini-lit) web components and T
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install @mariozechner/pi-web-ui @mariozechner/pi-agent-core @mariozechner/pi-ai
|
||||
npm install @earendil-works/pi-web-ui @earendil-works/pi-agent-core @earendil-works/pi-ai
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
@@ -25,8 +25,8 @@ npm install @mariozechner/pi-web-ui @mariozechner/pi-agent-core @mariozechner/pi
|
||||
See the [example](./example) directory for a complete working application.
|
||||
|
||||
```typescript
|
||||
import { Agent } from '@mariozechner/pi-agent-core';
|
||||
import { getModel } from '@mariozechner/pi-ai';
|
||||
import { Agent } from '@earendil-works/pi-agent-core';
|
||||
import { getModel } from '@earendil-works/pi-ai';
|
||||
import {
|
||||
ChatPanel,
|
||||
AppStorage,
|
||||
@@ -37,8 +37,8 @@ import {
|
||||
setAppStorage,
|
||||
defaultConvertToLlm,
|
||||
ApiKeyPromptDialog,
|
||||
} from '@mariozechner/pi-web-ui';
|
||||
import '@mariozechner/pi-web-ui/app.css';
|
||||
} from '@earendil-works/pi-web-ui';
|
||||
import '@earendil-works/pi-web-ui/app.css';
|
||||
|
||||
// Set up storage
|
||||
const settings = new SettingsStore();
|
||||
@@ -169,7 +169,7 @@ Properties:
|
||||
### Agent (from pi-agent-core)
|
||||
|
||||
```typescript
|
||||
import { Agent } from '@mariozechner/pi-agent-core';
|
||||
import { Agent } from '@earendil-works/pi-agent-core';
|
||||
|
||||
const agent = new Agent({
|
||||
initialState: {
|
||||
@@ -259,7 +259,7 @@ interface SystemNotification {
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
declare module '@mariozechner/pi-agent-core' {
|
||||
declare module '@earendil-works/pi-agent-core' {
|
||||
interface CustomAgentMessages {
|
||||
'system-notification': SystemNotification;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ function myConvertToLlm(messages: AgentMessage[]): Message[] {
|
||||
`convertToLlm` transforms app messages to LLM-compatible format:
|
||||
|
||||
```typescript
|
||||
import { defaultConvertToLlm, convertAttachments } from '@mariozechner/pi-web-ui';
|
||||
import { defaultConvertToLlm, convertAttachments } from '@earendil-works/pi-web-ui';
|
||||
|
||||
// defaultConvertToLlm handles:
|
||||
// - UserMessageWithAttachments → user message with image/text content blocks
|
||||
@@ -302,7 +302,7 @@ import { defaultConvertToLlm, convertAttachments } from '@mariozechner/pi-web-ui
|
||||
Execute JavaScript in a sandboxed browser environment:
|
||||
|
||||
```typescript
|
||||
import { createJavaScriptReplTool } from '@mariozechner/pi-web-ui';
|
||||
import { createJavaScriptReplTool } from '@earendil-works/pi-web-ui';
|
||||
|
||||
const replTool = createJavaScriptReplTool();
|
||||
|
||||
@@ -320,7 +320,7 @@ agent.state.tools = [replTool];
|
||||
Extract text from documents at URLs:
|
||||
|
||||
```typescript
|
||||
import { createExtractDocumentTool } from '@mariozechner/pi-web-ui';
|
||||
import { createExtractDocumentTool } from '@earendil-works/pi-web-ui';
|
||||
|
||||
const extractTool = createExtractDocumentTool();
|
||||
extractTool.corsProxyUrl = 'https://corsproxy.io/?';
|
||||
@@ -343,7 +343,7 @@ agent.state.tools = [artifactsPanel.tool];
|
||||
### Custom Tool Renderers
|
||||
|
||||
```typescript
|
||||
import { registerToolRenderer, type ToolRenderer } from '@mariozechner/pi-web-ui';
|
||||
import { registerToolRenderer, type ToolRenderer } from '@earendil-works/pi-web-ui';
|
||||
|
||||
const myRenderer: ToolRenderer = {
|
||||
render(params, result, isStreaming) {
|
||||
@@ -371,7 +371,7 @@ import {
|
||||
CustomProvidersStore,
|
||||
setAppStorage,
|
||||
getAppStorage,
|
||||
} from '@mariozechner/pi-web-ui';
|
||||
} from '@earendil-works/pi-web-ui';
|
||||
|
||||
// Create stores
|
||||
const settings = new SettingsStore();
|
||||
@@ -466,7 +466,7 @@ const all = await storage.customProviders.getAll();
|
||||
Load and process files:
|
||||
|
||||
```typescript
|
||||
import { loadAttachment, type Attachment } from '@mariozechner/pi-web-ui';
|
||||
import { loadAttachment, type Attachment } from '@earendil-works/pi-web-ui';
|
||||
|
||||
// From File input
|
||||
const file = inputElement.files[0];
|
||||
@@ -498,7 +498,7 @@ Supported formats: PDF, DOCX, XLSX, PPTX, images, text files.
|
||||
For browser environments with CORS restrictions:
|
||||
|
||||
```typescript
|
||||
import { createStreamFn, shouldUseProxyForProvider, isCorsError } from '@mariozechner/pi-web-ui';
|
||||
import { createStreamFn, shouldUseProxyForProvider, isCorsError } from '@earendil-works/pi-web-ui';
|
||||
|
||||
// AgentInterface auto-configures proxy from settings
|
||||
// For manual setup:
|
||||
@@ -517,7 +517,7 @@ agent.streamFn = createStreamFn(async () => {
|
||||
### SettingsDialog
|
||||
|
||||
```typescript
|
||||
import { SettingsDialog, ProvidersModelsTab, ProxyTab, ApiKeysTab } from '@mariozechner/pi-web-ui';
|
||||
import { SettingsDialog, ProvidersModelsTab, ProxyTab, ApiKeysTab } from '@earendil-works/pi-web-ui';
|
||||
|
||||
SettingsDialog.open([
|
||||
new ProvidersModelsTab(), // Custom providers + model list
|
||||
@@ -529,7 +529,7 @@ SettingsDialog.open([
|
||||
### SessionListDialog
|
||||
|
||||
```typescript
|
||||
import { SessionListDialog } from '@mariozechner/pi-web-ui';
|
||||
import { SessionListDialog } from '@earendil-works/pi-web-ui';
|
||||
|
||||
SessionListDialog.open(
|
||||
async (sessionId) => { /* load session */ },
|
||||
@@ -540,7 +540,7 @@ SessionListDialog.open(
|
||||
### ApiKeyPromptDialog
|
||||
|
||||
```typescript
|
||||
import { ApiKeyPromptDialog } from '@mariozechner/pi-web-ui';
|
||||
import { ApiKeyPromptDialog } from '@earendil-works/pi-web-ui';
|
||||
|
||||
const success = await ApiKeyPromptDialog.prompt('anthropic');
|
||||
```
|
||||
@@ -548,7 +548,7 @@ const success = await ApiKeyPromptDialog.prompt('anthropic');
|
||||
### ModelSelector
|
||||
|
||||
```typescript
|
||||
import { ModelSelector } from '@mariozechner/pi-web-ui';
|
||||
import { ModelSelector } from '@earendil-works/pi-web-ui';
|
||||
|
||||
ModelSelector.open(currentModel, (selectedModel) => {
|
||||
agent.state.model = selectedModel;
|
||||
@@ -560,7 +560,7 @@ ModelSelector.open(currentModel, (selectedModel) => {
|
||||
Import the pre-built CSS:
|
||||
|
||||
```typescript
|
||||
import '@mariozechner/pi-web-ui/app.css';
|
||||
import '@earendil-works/pi-web-ui/app.css';
|
||||
```
|
||||
|
||||
Or use Tailwind with custom config:
|
||||
@@ -575,7 +575,7 @@ Or use Tailwind with custom config:
|
||||
## Internationalization
|
||||
|
||||
```typescript
|
||||
import { i18n, setLanguage, translations } from '@mariozechner/pi-web-ui';
|
||||
import { i18n, setLanguage, translations } from '@earendil-works/pi-web-ui';
|
||||
|
||||
// Add translations
|
||||
translations.de = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Pi Web UI - Example
|
||||
|
||||
This is a minimal example showing how to use `@mariozechner/pi-web-ui` in a web application.
|
||||
This is a minimal example showing how to use `@earendil-works/pi-web-ui` in a web application.
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Pi Web UI - Example</title>
|
||||
<meta name="description" content="Example usage of @mariozechner/pi-web-ui - Reusable AI chat interface" />
|
||||
<meta name="description" content="Example usage of @earendil-works/pi-web-ui - Reusable AI chat interface" />
|
||||
</head>
|
||||
<body class="bg-background">
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/mini-lit": "^0.2.0",
|
||||
"@mariozechner/pi-ai": "file:../../ai",
|
||||
"@mariozechner/pi-web-ui": "file:../",
|
||||
"@earendil-works/pi-ai": "file:../../ai",
|
||||
"@earendil-works/pi-web-ui": "file:../",
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"lit": "^3.3.1",
|
||||
"lucide": "^0.544.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Message } from "@earendil-works/pi-ai";
|
||||
import type { AgentMessage, MessageRenderer } from "@earendil-works/pi-web-ui";
|
||||
import { defaultConvertToLlm, registerMessageRenderer } from "@earendil-works/pi-web-ui";
|
||||
import { Alert } from "@mariozechner/mini-lit/dist/Alert.js";
|
||||
import type { Message } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage, MessageRenderer } from "@mariozechner/pi-web-ui";
|
||||
import { defaultConvertToLlm, registerMessageRenderer } from "@mariozechner/pi-web-ui";
|
||||
import { html } from "lit";
|
||||
|
||||
// ============================================================================
|
||||
@@ -18,7 +18,7 @@ export interface SystemNotificationMessage {
|
||||
|
||||
// Extend CustomAgentMessages interface via declaration merging
|
||||
// This must target pi-agent-core where CustomAgentMessages is defined
|
||||
declare module "@mariozechner/pi-agent-core" {
|
||||
declare module "@earendil-works/pi-agent-core" {
|
||||
interface CustomAgentMessages {
|
||||
"system-notification": SystemNotificationMessage;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import "@mariozechner/mini-lit/dist/ThemeToggle.js";
|
||||
import { Agent, type AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import { getModel } from "@mariozechner/pi-ai";
|
||||
import { Agent, type AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import { getModel } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
type AgentState,
|
||||
ApiKeyPromptDialog,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
SettingsDialog,
|
||||
SettingsStore,
|
||||
setAppStorage,
|
||||
} from "@mariozechner/pi-web-ui";
|
||||
} from "@earendil-works/pi-web-ui";
|
||||
import { html, render } from "lit";
|
||||
import { Bell, History, Plus, Settings } from "lucide";
|
||||
import "./app.css";
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"moduleResolution": "bundler",
|
||||
"paths": {
|
||||
"*": ["./*"],
|
||||
"@mariozechner/pi-agent-core": ["../../agent/dist/index.d.ts"],
|
||||
"@mariozechner/pi-ai": ["../../ai/dist/index.d.ts"],
|
||||
"@mariozechner/pi-tui": ["../../tui/dist/index.d.ts"],
|
||||
"@mariozechner/pi-web-ui": ["../dist/index.d.ts"]
|
||||
"@earendil-works/pi-agent-core": ["../../agent/dist/index.d.ts"],
|
||||
"@earendil-works/pi-ai": ["../../ai/dist/index.d.ts"],
|
||||
"@earendil-works/pi-tui": ["../../tui/dist/index.d.ts"],
|
||||
"@earendil-works/pi-web-ui": ["../dist/index.d.ts"]
|
||||
},
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mariozechner/pi-web-ui",
|
||||
"name": "@earendil-works/pi-web-ui",
|
||||
"version": "0.73.1",
|
||||
"description": "Reusable web UI components for AI chat interfaces powered by @mariozechner/pi-ai",
|
||||
"description": "Reusable web UI components for AI chat interfaces powered by @earendil-works/pi-ai",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@lmstudio/sdk": "^1.5.0",
|
||||
"@mariozechner/pi-ai": "^0.73.1",
|
||||
"@mariozechner/pi-tui": "^0.73.1",
|
||||
"@earendil-works/pi-ai": "^0.73.1",
|
||||
"@earendil-works/pi-tui": "^0.73.1",
|
||||
"typebox": "^1.1.24",
|
||||
"docx-preview": "^0.3.7",
|
||||
"jszip": "^3.10.1",
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Badge } from "@mariozechner/mini-lit/dist/Badge.js";
|
||||
import { html, LitElement } from "lit";
|
||||
import { customElement, state } from "lit/decorators.js";
|
||||
import "./components/AgentInterface.js";
|
||||
import type { Agent, AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { Agent, AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { AgentInterface } from "./components/AgentInterface.js";
|
||||
import { ArtifactsRuntimeProvider } from "./components/sandbox/ArtifactsRuntimeProvider.js";
|
||||
import { AttachmentsRuntimeProvider } from "./components/sandbox/AttachmentsRuntimeProvider.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { streamSimple, type ToolResultMessage, type Usage } from "@mariozechner/pi-ai";
|
||||
import { streamSimple, type ToolResultMessage, type Usage } from "@earendil-works/pi-ai";
|
||||
import { html, LitElement } from "lit";
|
||||
import { customElement, property, query } from "lit/decorators.js";
|
||||
import { ModelSelector } from "../dialogs/ModelSelector.js";
|
||||
@@ -8,7 +8,7 @@ import "./MessageList.js";
|
||||
import "./Messages.js"; // Import for side effects to register the custom elements
|
||||
import { getAppStorage } from "../storage/app-storage.js";
|
||||
import "./StreamingMessageContainer.js";
|
||||
import type { Agent, AgentEvent } from "@mariozechner/pi-agent-core";
|
||||
import type { Agent, AgentEvent } from "@earendil-works/pi-agent-core";
|
||||
import type { Attachment } from "../utils/attachment-utils.js";
|
||||
import { formatUsage } from "../utils/format.js";
|
||||
import { i18n } from "../utils/i18n.js";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
import { icon } from "@mariozechner/mini-lit";
|
||||
import { Button } from "@mariozechner/mini-lit/dist/Button.js";
|
||||
import { Select, type SelectOption } from "@mariozechner/mini-lit/dist/Select.js";
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import { html, LitElement } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators.js";
|
||||
import { createRef, ref } from "lit/directives/ref.js";
|
||||
@@ -9,7 +9,7 @@ import { Brain, Loader2, Paperclip, Send, Sparkles, Square } from "lucide";
|
||||
import { type Attachment, loadAttachment } from "../utils/attachment-utils.js";
|
||||
import { i18n } from "../utils/i18n.js";
|
||||
import "./AttachmentTile.js";
|
||||
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
|
||||
@customElement("message-editor")
|
||||
export class MessageEditor extends LitElement {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { AgentMessage, AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentMessage, AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type {
|
||||
AssistantMessage as AssistantMessageType,
|
||||
ToolResultMessage as ToolResultMessageType,
|
||||
} from "@mariozechner/pi-ai";
|
||||
} from "@earendil-works/pi-ai";
|
||||
import { html, LitElement, type TemplateResult } from "lit";
|
||||
import { property } from "lit/decorators.js";
|
||||
import { repeat } from "lit/directives/repeat.js";
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
ToolCall,
|
||||
ToolResultMessage as ToolResultMessageType,
|
||||
UserMessage as UserMessageType,
|
||||
} from "@mariozechner/pi-ai";
|
||||
} from "@earendil-works/pi-ai";
|
||||
import { html, LitElement, type TemplateResult } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
import { renderTool } from "../tools/index.js";
|
||||
@@ -13,7 +13,7 @@ import type { Attachment } from "../utils/attachment-utils.js";
|
||||
import { formatUsage } from "../utils/format.js";
|
||||
import { i18n } from "../utils/i18n.js";
|
||||
import "./ThinkingBlock.js";
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
|
||||
export type UserMessageWithAttachments = {
|
||||
role: "user-with-attachments";
|
||||
@@ -32,7 +32,7 @@ export interface ArtifactMessage {
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
declare module "@mariozechner/pi-agent-core" {
|
||||
declare module "@earendil-works/pi-agent-core" {
|
||||
interface CustomAgentMessages {
|
||||
"user-with-attachments": UserMessageWithAttachments;
|
||||
artifact: ArtifactMessage;
|
||||
@@ -296,8 +296,8 @@ export class AbortedMessage extends LitElement {
|
||||
// Default Message Transformer
|
||||
// ============================================================================
|
||||
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { Message } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { Message } from "@earendil-works/pi-ai";
|
||||
|
||||
/**
|
||||
* Convert attachments to content blocks for LLM.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type Context, complete, getModel } from "@earendil-works/pi-ai";
|
||||
import { i18n } from "@mariozechner/mini-lit";
|
||||
import { Badge } from "@mariozechner/mini-lit/dist/Badge.js";
|
||||
import { Button } from "@mariozechner/mini-lit/dist/Button.js";
|
||||
import { type Context, complete, getModel } from "@mariozechner/pi-ai";
|
||||
import { html, LitElement } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators.js";
|
||||
import { getAppStorage } from "../storage/app-storage.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentMessage, AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage, AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { html, LitElement } from "lit";
|
||||
import { property, state } from "lit/decorators.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { TemplateResult } from "lit";
|
||||
|
||||
// Extract role type from AppMessage union
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import {
|
||||
ARTIFACTS_RUNTIME_PROVIDER_DESCRIPTION_RO,
|
||||
ARTIFACTS_RUNTIME_PROVIDER_DESCRIPTION_RW,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
import { i18n } from "@mariozechner/mini-lit";
|
||||
import { Button } from "@mariozechner/mini-lit/dist/Button.js";
|
||||
import { DialogBase } from "@mariozechner/mini-lit/dist/DialogBase.js";
|
||||
import { Input } from "@mariozechner/mini-lit/dist/Input.js";
|
||||
import { Label } from "@mariozechner/mini-lit/dist/Label.js";
|
||||
import { Select } from "@mariozechner/mini-lit/dist/Select.js";
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import { html, type TemplateResult } from "lit";
|
||||
import { state } from "lit/decorators.js";
|
||||
import { getAppStorage } from "../storage/app-storage.js";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { getModels, getProviders, type Model, modelsAreEqual } from "@earendil-works/pi-ai";
|
||||
import { icon } from "@mariozechner/mini-lit";
|
||||
import { Badge } from "@mariozechner/mini-lit/dist/Badge.js";
|
||||
import { Button } from "@mariozechner/mini-lit/dist/Button.js";
|
||||
import { DialogHeader } from "@mariozechner/mini-lit/dist/Dialog.js";
|
||||
import { DialogBase } from "@mariozechner/mini-lit/dist/DialogBase.js";
|
||||
import { getModels, getProviders, type Model, modelsAreEqual } from "@mariozechner/pi-ai";
|
||||
import { html, type PropertyValues, type TemplateResult } from "lit";
|
||||
import { customElement, state } from "lit/decorators.js";
|
||||
import { createRef, ref } from "lit/directives/ref.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getProviders } from "@earendil-works/pi-ai";
|
||||
import { i18n } from "@mariozechner/mini-lit";
|
||||
import { Select } from "@mariozechner/mini-lit/dist/Select.js";
|
||||
import { getProviders } from "@mariozechner/pi-ai";
|
||||
import { html, type TemplateResult } from "lit";
|
||||
import { customElement, state } from "lit/decorators.js";
|
||||
import "../components/CustomProviderCard.js";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { getProviders } from "@earendil-works/pi-ai";
|
||||
import { i18n } from "@mariozechner/mini-lit";
|
||||
import { Dialog, DialogContent, DialogHeader } from "@mariozechner/mini-lit/dist/Dialog.js";
|
||||
import { Input } from "@mariozechner/mini-lit/dist/Input.js";
|
||||
import { Label } from "@mariozechner/mini-lit/dist/Label.js";
|
||||
import { Switch } from "@mariozechner/mini-lit/dist/Switch.js";
|
||||
import { getProviders } from "@mariozechner/pi-ai";
|
||||
import { html, LitElement, type TemplateResult } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators.js";
|
||||
import "../components/ProviderKeyInput.js";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Main chat interface
|
||||
|
||||
export type { Agent, AgentMessage, AgentState, ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
export type { Model } from "@mariozechner/pi-ai";
|
||||
export type { Agent, AgentMessage, AgentState, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
export type { Model } from "@earendil-works/pi-ai";
|
||||
export { ChatPanel } from "./ChatPanel.js";
|
||||
// Components
|
||||
export { AgentInterface } from "./components/AgentInterface.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
import { Store } from "../store.js";
|
||||
import type { StoreConfig } from "../types.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentState } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentState } from "@earendil-works/pi-agent-core";
|
||||
import { Store } from "../store.js";
|
||||
import type { SessionData, SessionMetadata, StoreConfig } from "../types.js";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentMessage, ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
|
||||
/**
|
||||
* Transaction interface for atomic operations across stores.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import "@mariozechner/mini-lit/dist/CodeBlock.js";
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { createRef, ref } from "lit/directives/ref.js";
|
||||
import { FileCode2 } from "lucide";
|
||||
import "../../components/ConsoleBlock.js";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { icon } from "@mariozechner/mini-lit";
|
||||
import "@mariozechner/mini-lit/dist/MarkdownBlock.js";
|
||||
import type { Agent, AgentMessage, AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { StringEnum, type ToolCall } from "@earendil-works/pi-ai";
|
||||
import { Button } from "@mariozechner/mini-lit/dist/Button.js";
|
||||
import type { Agent, AgentMessage, AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { StringEnum, type ToolCall } from "@mariozechner/pi-ai";
|
||||
import { html, LitElement, type TemplateResult } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators.js";
|
||||
import { createRef, type Ref, ref } from "lit/directives/ref.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { html } from "lit";
|
||||
import { createRef, ref } from "lit/directives/ref.js";
|
||||
import { FileText } from "lucide";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import "./javascript-repl.js"; // Auto-registers the renderer
|
||||
import "./extract-document.js"; // Auto-registers the renderer
|
||||
import { getToolRenderer, registerToolRenderer } from "./renderer-registry.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { i18n } from "@mariozechner/mini-lit";
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import { html } from "lit";
|
||||
import { createRef, ref } from "lit/directives/ref.js";
|
||||
import { Code } from "lucide";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { html } from "lit";
|
||||
import { SquareTerminal } from "lucide";
|
||||
import { i18n } from "../../utils/i18n.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { html } from "lit";
|
||||
import { Calculator } from "lucide";
|
||||
import { i18n } from "../../utils/i18n.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { html } from "lit";
|
||||
import { Code } from "lucide";
|
||||
import { i18n } from "../../utils/i18n.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import { html } from "lit";
|
||||
import { Clock } from "lucide";
|
||||
import { i18n } from "../../utils/i18n.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { ToolResultMessage } from "@earendil-works/pi-ai";
|
||||
import type { TemplateResult } from "lit";
|
||||
|
||||
export interface ToolRenderResult {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Usage } from "@earendil-works/pi-ai";
|
||||
import { i18n } from "@mariozechner/mini-lit";
|
||||
import type { Usage } from "@mariozechner/pi-ai";
|
||||
|
||||
export function formatCost(cost: number): string {
|
||||
return `$${cost.toFixed(4)}`;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
import { LMStudioClient } from "@lmstudio/sdk";
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import { Ollama } from "ollama/browser";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Api, Context, Model, SimpleStreamOptions } from "@mariozechner/pi-ai";
|
||||
import { streamSimple } from "@mariozechner/pi-ai";
|
||||
import type { Api, Context, Model, SimpleStreamOptions } from "@earendil-works/pi-ai";
|
||||
import { streamSimple } from "@earendil-works/pi-ai";
|
||||
|
||||
/**
|
||||
* Centralized proxy decision logic.
|
||||
|
||||
Reference in New Issue
Block a user