chore: migrate pi packages to earendil works scope

This commit is contained in:
Mario Zechner
2026-05-07 15:59:42 +02:00
parent 801db80b65
commit 3e5ad67e0f
324 changed files with 958 additions and 1062 deletions

View File

@@ -2,7 +2,7 @@
* Armin says hi! A fun easter egg with animated XBM art.
*/
import type { Component, TUI } from "@mariozechner/pi-tui";
import type { Component, TUI } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
// XBM image: 31x36 pixels, LSB first, 1=background, 0=foreground

View File

@@ -1,5 +1,5 @@
import type { AssistantMessage } from "@mariozechner/pi-ai";
import { Container, Markdown, type MarkdownTheme, Spacer, Text } from "@mariozechner/pi-tui";
import type { AssistantMessage } from "@earendil-works/pi-ai";
import { Container, Markdown, type MarkdownTheme, Spacer, Text } from "@earendil-works/pi-tui";
import { getMarkdownTheme, theme } from "../theme/theme.js";
const OSC133_ZONE_START = "\x1b]133;A\x07";

View File

@@ -2,7 +2,7 @@
* Component for displaying bash command execution with streaming output.
*/
import { Container, Loader, Spacer, Text, type TUI } from "@mariozechner/pi-tui";
import { Container, Loader, Spacer, Text, type TUI } from "@earendil-works/pi-tui";
import stripAnsi from "strip-ansi";
import {
DEFAULT_MAX_BYTES,

View File

@@ -1,4 +1,4 @@
import { CancellableLoader, Container, Loader, Spacer, Text, type TUI } from "@mariozechner/pi-tui";
import { CancellableLoader, Container, Loader, Spacer, Text, type TUI } from "@earendil-works/pi-tui";
import type { Theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";
import { keyHint } from "./keybinding-hints.js";

View File

@@ -1,4 +1,4 @@
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@mariozechner/pi-tui";
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@earendil-works/pi-tui";
import type { BranchSummaryMessage } from "../../../core/messages.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";
import { keyText } from "./keybinding-hints.js";

View File

@@ -1,4 +1,4 @@
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@mariozechner/pi-tui";
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@earendil-works/pi-tui";
import type { CompactionSummaryMessage } from "../../../core/messages.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";
import { keyText } from "./keybinding-hints.js";

View File

@@ -13,7 +13,7 @@ import {
Spacer,
truncateToWidth,
visibleWidth,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import { CONFIG_DIR_NAME } from "../../../config.js";
import type { PathMetadata, ResolvedPaths, ResolvedResource } from "../../../core/package-manager.js";
import type { PackageSource, SettingsManager } from "../../../core/settings-manager.js";

View File

@@ -2,7 +2,7 @@
* Reusable countdown timer for dialog components.
*/
import type { TUI } from "@mariozechner/pi-tui";
import type { TUI } from "@earendil-works/pi-tui";
export class CountdownTimer {
private intervalId: ReturnType<typeof setInterval> | undefined;

View File

@@ -1,4 +1,4 @@
import { Editor, type EditorOptions, type EditorTheme, type TUI } from "@mariozechner/pi-tui";
import { Editor, type EditorOptions, type EditorTheme, type TUI } from "@earendil-works/pi-tui";
import type { AppKeybinding, KeybindingsManager } from "../../../core/keybindings.js";
/**

View File

@@ -1,6 +1,6 @@
import type { TextContent } from "@mariozechner/pi-ai";
import type { Component } from "@mariozechner/pi-tui";
import { Box, Container, Markdown, type MarkdownTheme, Spacer, Text } from "@mariozechner/pi-tui";
import type { TextContent } from "@earendil-works/pi-ai";
import type { Component } from "@earendil-works/pi-tui";
import { Box, Container, Markdown, type MarkdownTheme, Spacer, Text } from "@earendil-works/pi-tui";
import type { MessageRenderer } from "../../../core/extensions/types.js";
import type { CustomMessage } from "../../../core/messages.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";

View File

@@ -4,7 +4,7 @@
* A heartfelt tribute to dax (@thdxr) for providing free Kimi K2.5 access via OpenCode.
*/
import type { Component, TUI } from "@mariozechner/pi-tui";
import type { Component, TUI } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
// 32x32 RGB image of dax, hex encoded (3 bytes per pixel)

View File

@@ -1,4 +1,4 @@
import type { Component } from "@mariozechner/pi-tui";
import type { Component } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
/**

View File

@@ -1,5 +1,5 @@
import * as fs from "node:fs";
import { Container, Image, Spacer, Text } from "@mariozechner/pi-tui";
import { Container, Image, Spacer, Text } from "@earendil-works/pi-tui";
import { getBundledInteractiveAssetPath } from "../../../config.js";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -16,7 +16,7 @@ import {
Spacer,
Text,
type TUI,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import type { KeybindingsManager } from "../../../core/keybindings.js";
import { getEditorTheme, theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -2,7 +2,7 @@
* Simple text input component for extensions.
*/
import { Container, type Focusable, getKeybindings, Input, Spacer, Text, type TUI } from "@mariozechner/pi-tui";
import { Container, type Focusable, getKeybindings, Input, Spacer, Text, type TUI } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
import { CountdownTimer } from "./countdown-timer.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -3,7 +3,7 @@
* Displays a list of string options with keyboard navigation.
*/
import { Container, getKeybindings, Spacer, Text, type TUI } from "@mariozechner/pi-tui";
import { Container, getKeybindings, Spacer, Text, type TUI } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
import { CountdownTimer } from "./countdown-timer.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { type Component, truncateToWidth, visibleWidth } from "@mariozechner/pi-tui";
import { type Component, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
import type { AgentSession } from "../../../core/agent-session.js";
import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.js";
import { theme } from "../theme/theme.js";

View File

@@ -2,7 +2,7 @@
* Utilities for formatting keybinding hints in the UI.
*/
import { getKeybindings, type Keybinding, type KeyId } from "@mariozechner/pi-tui";
import { getKeybindings, type Keybinding, type KeyId } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
function formatKeys(keys: KeyId[]): string {

View File

@@ -1,5 +1,5 @@
import { getOAuthProviders } from "@mariozechner/pi-ai/oauth";
import { Container, type Focusable, getKeybindings, Input, Spacer, Text, type TUI } from "@mariozechner/pi-tui";
import { getOAuthProviders } from "@earendil-works/pi-ai/oauth";
import { Container, type Focusable, getKeybindings, Input, Spacer, Text, type TUI } from "@earendil-works/pi-tui";
import { exec } from "child_process";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { type Model, modelsAreEqual } from "@mariozechner/pi-ai";
import { type Model, modelsAreEqual } from "@earendil-works/pi-ai";
import {
Container,
type Focusable,
@@ -8,7 +8,7 @@ import {
Spacer,
Text,
type TUI,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import type { ModelRegistry } from "../../../core/model-registry.js";
import type { SettingsManager } from "../../../core/settings-manager.js";
import { theme } from "../theme/theme.js";

View File

@@ -6,7 +6,7 @@ import {
Input,
Spacer,
TruncatedText,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import type { AuthStatus, AuthStorage } from "../../../core/auth-storage.js";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import type { Model } from "@mariozechner/pi-ai";
import type { Model } from "@earendil-works/pi-ai";
import {
Container,
type Focusable,
@@ -9,7 +9,7 @@ import {
matchesKey,
Spacer,
Text,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";
import { keyText } from "./keybinding-hints.js";

View File

@@ -1,4 +1,4 @@
import { fuzzyMatch } from "@mariozechner/pi-tui";
import { fuzzyMatch } from "@earendil-works/pi-tui";
import type { SessionInfo } from "../../../core/session-manager.js";
export type SortMode = "threaded" | "recent" | "relevance";

View File

@@ -12,7 +12,7 @@ import {
Text,
truncateToWidth,
visibleWidth,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import { KeybindingsManager } from "../../../core/keybindings.js";
import type { SessionInfo, SessionListProgress } from "../../../core/session-manager.js";
import { canonicalizePath as _canonicalizePath } from "../../../utils/paths.js";

View File

@@ -1,5 +1,5 @@
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
import type { Transport } from "@mariozechner/pi-ai";
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { Transport } from "@earendil-works/pi-ai";
import {
Container,
getCapabilities,
@@ -10,7 +10,7 @@ import {
SettingsList,
Spacer,
Text,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import type { WarningSettings } from "../../../core/settings-manager.js";
import { getSelectListTheme, getSettingsListTheme, theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from "@mariozechner/pi-tui";
import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from "@earendil-works/pi-tui";
import { getSelectListTheme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { Box, Markdown, type MarkdownTheme, Text } from "@mariozechner/pi-tui";
import { Box, Markdown, type MarkdownTheme, Text } from "@earendil-works/pi-tui";
import type { ParsedSkillBlock } from "../../../core/agent-session.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";
import { keyText } from "./keybinding-hints.js";

View File

@@ -1,4 +1,4 @@
import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from "@mariozechner/pi-tui";
import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from "@earendil-works/pi-tui";
import { getAvailableThemes, getSelectListTheme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,5 +1,5 @@
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from "@mariozechner/pi-tui";
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from "@earendil-works/pi-tui";
import { getSelectListTheme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { Box, type Component, Container, getCapabilities, Image, Spacer, Text, type TUI } from "@mariozechner/pi-tui";
import { Box, type Component, Container, getCapabilities, Image, Spacer, Text, type TUI } from "@earendil-works/pi-tui";
import type { ToolDefinition, ToolRenderContext } from "../../../core/extensions/types.js";
import { createAllToolDefinitions, type ToolName } from "../../../core/tools/index.js";
import { getTextOutput as getRenderedTextOutput } from "../../../core/tools/render-utils.js";

View File

@@ -8,7 +8,7 @@ import {
Text,
TruncatedText,
truncateToWidth,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import type { SessionTreeNode } from "../../../core/session-manager.js";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { type Component, Container, getKeybindings, Spacer, Text, truncateToWidth } from "@mariozechner/pi-tui";
import { type Component, Container, getKeybindings, Spacer, Text, truncateToWidth } from "@earendil-works/pi-tui";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View File

@@ -1,4 +1,4 @@
import { Box, Container, Markdown, type MarkdownTheme } from "@mariozechner/pi-tui";
import { Box, Container, Markdown, type MarkdownTheme } from "@earendil-works/pi-tui";
import { getMarkdownTheme, theme } from "../theme/theme.js";
const OSC133_ZONE_START = "\x1b]133;A\x07";

View File

@@ -3,7 +3,7 @@
* Used by both tool-execution.ts and bash-execution.ts for consistent behavior.
*/
import { Text } from "@mariozechner/pi-tui";
import { Text } from "@earendil-works/pi-tui";
export interface VisualTruncateResult {
/** The visual lines to display */

View File

@@ -7,7 +7,7 @@ import * as crypto from "node:crypto";
import * as fs from "node:fs";
import * as os from "node:os";
import * as path from "node:path";
import type { AgentMessage } from "@mariozechner/pi-agent-core";
import type { AgentMessage } from "@earendil-works/pi-agent-core";
import {
type AssistantMessage,
getProviders,
@@ -16,7 +16,7 @@ import {
type Model,
type OAuthProviderId,
type OAuthSelectPrompt,
} from "@mariozechner/pi-ai";
} from "@earendil-works/pi-ai";
import type {
AutocompleteItem,
AutocompleteProvider,
@@ -27,7 +27,7 @@ import type {
OverlayHandle,
OverlayOptions,
SlashCommand,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import {
CombinedAutocompleteProvider,
type Component,
@@ -44,7 +44,7 @@ import {
TruncatedText,
TUI,
visibleWidth,
} from "@mariozechner/pi-tui";
} from "@earendil-works/pi-tui";
import { spawn, spawnSync } from "child_process";
import {
APP_NAME,
@@ -3522,7 +3522,7 @@ export class InteractiveMode {
const updateInstruction = theme.fg("muted", `New version ${newVersion} is available. Run `) + action;
const changelogUrl = theme.fg(
"accent",
"https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md",
"https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md",
);
const changelogLine = theme.fg("muted", "Changelog: ") + changelogUrl;

View File

@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
"$schema": "https://raw.githubusercontent.com/earendil-works/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
"name": "dark",
"vars": {
"cyan": "#00d7ff",

View File

@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
"$schema": "https://raw.githubusercontent.com/earendil-works/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
"name": "light",
"vars": {
"teal": "#5a8080",

View File

@@ -1,6 +1,6 @@
import * as fs from "node:fs";
import * as path from "node:path";
import type { EditorTheme, MarkdownTheme, SelectListTheme } from "@mariozechner/pi-tui";
import type { EditorTheme, MarkdownTheme, SelectListTheme } from "@earendil-works/pi-tui";
import chalk from "chalk";
import { highlight, supportsLanguage } from "cli-highlight";
import { type Static, Type } from "typebox";
@@ -657,7 +657,7 @@ function getDefaultTheme(): string {
// ============================================================================
// Use globalThis to share theme across module loaders (tsx + jiti in dev mode)
const THEME_KEY = Symbol.for("@mariozechner/pi-coding-agent:theme");
const THEME_KEY = Symbol.for("@earendil-works/pi-coding-agent:theme");
// Export theme as a getter that reads from globalThis
// This ensures all module instances (tsx, jiti) see the same theme
@@ -1130,7 +1130,7 @@ export function getEditorTheme(): EditorTheme {
};
}
export function getSettingsListTheme(): import("@mariozechner/pi-tui").SettingsListTheme {
export function getSettingsListTheme(): import("@earendil-works/pi-tui").SettingsListTheme {
return {
label: (text: string, selected: boolean) => (selected ? theme.fg("accent", text) : text),
value: (text: string, selected: boolean) => (selected ? theme.fg("accent", text) : theme.fg("muted", text)),