chore: migrate packages to earendil works scope
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { setBedrockProviderModule } from "@mariozechner/pi-ai";
|
||||
import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
|
||||
import { setBedrockProviderModule } from "@earendil-works/pi-ai";
|
||||
import { bedrockProviderModule } from "@earendil-works/pi-ai/bedrock-provider";
|
||||
|
||||
setBedrockProviderModule(bedrockProviderModule);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* CLI argument parsing and help display
|
||||
*/
|
||||
|
||||
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import chalk from "chalk";
|
||||
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_SESSION_DIR } from "../config.js";
|
||||
import type { ExtensionFlag } from "../core/extensions/types.js";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* TUI config selector for `pi config` command
|
||||
*/
|
||||
|
||||
import { ProcessTerminal, TUI } from "@mariozechner/pi-tui";
|
||||
import { ProcessTerminal, TUI } from "@earendil-works/pi-tui";
|
||||
import type { ResolvedPaths } from "../core/package-manager.js";
|
||||
import type { SettingsManager } from "../core/settings-manager.js";
|
||||
import { ConfigSelectorComponent } from "../modes/interactive/components/config-selector.js";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import { access, readFile, stat } from "node:fs/promises";
|
||||
import type { ImageContent } from "@mariozechner/pi-ai";
|
||||
import type { ImageContent } from "@earendil-works/pi-ai";
|
||||
import chalk from "chalk";
|
||||
import { resolve } from "path";
|
||||
import { resolveReadPath } from "../core/tools/path-utils.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ImageContent } from "@mariozechner/pi-ai";
|
||||
import type { ImageContent } from "@earendil-works/pi-ai";
|
||||
import type { Args } from "./args.js";
|
||||
|
||||
export interface InitialMessageInput {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* List available models with optional fuzzy search
|
||||
*/
|
||||
|
||||
import type { Api, Model } from "@mariozechner/pi-ai";
|
||||
import { fuzzyFilter } from "@mariozechner/pi-tui";
|
||||
import type { Api, Model } from "@earendil-works/pi-ai";
|
||||
import { fuzzyFilter } from "@earendil-works/pi-tui";
|
||||
import chalk from "chalk";
|
||||
import { formatNoModelsAvailableMessage } from "../core/auth-guidance.js";
|
||||
import type { ModelRegistry } from "../core/model-registry.js";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* TUI session selector for --resume flag
|
||||
*/
|
||||
|
||||
import { ProcessTerminal, setKeybindings, TUI } from "@mariozechner/pi-tui";
|
||||
import { ProcessTerminal, setKeybindings, TUI } from "@earendil-works/pi-tui";
|
||||
import { KeybindingsManager } from "../core/keybindings.js";
|
||||
import type { SessionInfo, SessionListProgress } from "../core/session-manager.js";
|
||||
import { SessionSelectorComponent } from "../modes/interactive/components/session-selector.js";
|
||||
|
||||
@@ -274,7 +274,7 @@ export function getSelfUpdateUnavailableInstruction(
|
||||
): string {
|
||||
const method = detectInstallMethod();
|
||||
if (method === "bun-binary") {
|
||||
return `Download from: https://github.com/badlogic/pi-mono/releases/latest`;
|
||||
return `Download from: https://github.com/earendil-works/pi-mono/releases/latest`;
|
||||
}
|
||||
const command = getSelfUpdateCommandForMethod(method, packageName, updatePackageName, npmCommand);
|
||||
if (command) {
|
||||
@@ -422,7 +422,7 @@ interface PackageJson {
|
||||
const pkg = JSON.parse(readFileSync(getPackageJsonPath(), "utf-8")) as PackageJson;
|
||||
|
||||
const piConfigName: string | undefined = pkg.piConfig?.name;
|
||||
export const PACKAGE_NAME: string = pkg.name || "@mariozechner/pi-coding-agent";
|
||||
export const PACKAGE_NAME: string = pkg.name || "@earendil-works/pi-coding-agent";
|
||||
export const APP_NAME: string = piConfigName || "pi";
|
||||
export const APP_TITLE: string = piConfigName ? APP_NAME : "π";
|
||||
export const CONFIG_DIR_NAME: string = pkg.piConfig?.configDir || ".pi";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { join } from "node:path";
|
||||
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
import { getAgentDir } from "../config.js";
|
||||
import { AuthStorage } from "./auth-storage.js";
|
||||
import type { SessionStartEvent, ToolDefinition } from "./extensions/index.js";
|
||||
|
||||
@@ -22,8 +22,8 @@ import type {
|
||||
AgentState,
|
||||
AgentTool,
|
||||
ThinkingLevel,
|
||||
} from "@mariozechner/pi-agent-core";
|
||||
import type { AssistantMessage, ImageContent, Message, Model, TextContent } from "@mariozechner/pi-ai";
|
||||
} from "@earendil-works/pi-agent-core";
|
||||
import type { AssistantMessage, ImageContent, Message, Model, TextContent } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
clampThinkingLevel,
|
||||
cleanupSessionResources,
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
isContextOverflow,
|
||||
modelsAreEqual,
|
||||
resetApiProviders,
|
||||
} from "@mariozechner/pi-ai";
|
||||
} from "@earendil-works/pi-ai";
|
||||
import { theme } from "../modes/interactive/theme/theme.js";
|
||||
import { stripFrontmatter } from "../utils/frontmatter.js";
|
||||
import { sleep } from "../utils/sleep.js";
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
type OAuthCredentials,
|
||||
type OAuthLoginCallbacks,
|
||||
type OAuthProviderId,
|
||||
} from "@mariozechner/pi-ai";
|
||||
import { getOAuthApiKey, getOAuthProvider, getOAuthProviders } from "@mariozechner/pi-ai/oauth";
|
||||
} from "@earendil-works/pi-ai";
|
||||
import { getOAuthApiKey, getOAuthProvider, getOAuthProviders } from "@earendil-works/pi-ai/oauth";
|
||||
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import lockfile from "proper-lockfile";
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
* a summary of the branch being left so context isn't lost.
|
||||
*/
|
||||
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { Model } from "@mariozechner/pi-ai";
|
||||
import { completeSimple } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
import { completeSimple } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
convertToLlm,
|
||||
createBranchSummaryMessage,
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
* and after compaction the session is reloaded.
|
||||
*/
|
||||
|
||||
import type { AgentMessage, ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { AssistantMessage, Model, Usage } from "@mariozechner/pi-ai";
|
||||
import { completeSimple } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import type { AssistantMessage, Model, Usage } from "@earendil-works/pi-ai";
|
||||
import { completeSimple } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
convertToLlm,
|
||||
createBranchSummaryMessage,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Shared utilities for compaction and branch summarization.
|
||||
*/
|
||||
|
||||
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";
|
||||
|
||||
// ============================================================================
|
||||
// File Operation Tracking
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
|
||||
export const DEFAULT_THINKING_LEVEL: ThinkingLevel = "medium";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentState } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentState } from "@earendil-works/pi-agent-core";
|
||||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { basename, join } from "path";
|
||||
import { APP_NAME, getExportTemplateDir } from "../../config.js";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* and converting the ANSI output to HTML.
|
||||
*/
|
||||
|
||||
import type { ImageContent, TextContent } from "@mariozechner/pi-ai";
|
||||
import type { Component } from "@mariozechner/pi-tui";
|
||||
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
||||
import type { Component } from "@earendil-works/pi-tui";
|
||||
import type { Theme } from "../../modes/interactive/theme/theme.js";
|
||||
import type { ToolDefinition, ToolRenderContext } from "../extensions/types.js";
|
||||
import { ansiLinesToHtml } from "./ansi-to-html.js";
|
||||
|
||||
@@ -8,11 +8,11 @@ import { createRequire } from "node:module";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import * as _bundledPiAgentCore from "@mariozechner/pi-agent-core";
|
||||
import * as _bundledPiAi from "@mariozechner/pi-ai";
|
||||
import * as _bundledPiAiOauth from "@mariozechner/pi-ai/oauth";
|
||||
import type { KeyId } from "@mariozechner/pi-tui";
|
||||
import * as _bundledPiTui from "@mariozechner/pi-tui";
|
||||
import * as _bundledPiAgentCore from "@earendil-works/pi-agent-core";
|
||||
import * as _bundledPiAi from "@earendil-works/pi-ai";
|
||||
import * as _bundledPiAiOauth from "@earendil-works/pi-ai/oauth";
|
||||
import type { KeyId } from "@earendil-works/pi-tui";
|
||||
import * as _bundledPiTui from "@earendil-works/pi-tui";
|
||||
import { createJiti } from "jiti/static";
|
||||
// Static imports of packages that extensions may use.
|
||||
// These MUST be static so Bun bundles them into the compiled binary.
|
||||
@@ -22,7 +22,7 @@ import * as _bundledTypeboxCompile from "typebox/compile";
|
||||
import * as _bundledTypeboxValue from "typebox/value";
|
||||
import { CONFIG_DIR_NAME, getAgentDir, isBunBinary } from "../../config.js";
|
||||
// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,
|
||||
// avoiding a circular dependency. Extensions can import from @mariozechner/pi-coding-agent.
|
||||
// avoiding a circular dependency. Extensions can import from @earendil-works/pi-coding-agent.
|
||||
import * as _bundledPiCodingAgent from "../../index.js";
|
||||
import { createEventBus, type EventBus } from "../event-bus.js";
|
||||
import type { ExecOptions } from "../exec.js";
|
||||
@@ -48,6 +48,11 @@ const VIRTUAL_MODULES: Record<string, unknown> = {
|
||||
"@sinclair/typebox": _bundledTypebox,
|
||||
"@sinclair/typebox/compile": _bundledTypeboxCompile,
|
||||
"@sinclair/typebox/value": _bundledTypeboxValue,
|
||||
"@earendil-works/pi-agent-core": _bundledPiAgentCore,
|
||||
"@earendil-works/pi-tui": _bundledPiTui,
|
||||
"@earendil-works/pi-ai": _bundledPiAi,
|
||||
"@earendil-works/pi-ai/oauth": _bundledPiAiOauth,
|
||||
"@earendil-works/pi-coding-agent": _bundledPiCodingAgent,
|
||||
"@mariozechner/pi-agent-core": _bundledPiAgentCore,
|
||||
"@mariozechner/pi-tui": _bundledPiTui,
|
||||
"@mariozechner/pi-ai": _bundledPiAi,
|
||||
@@ -82,12 +87,23 @@ function getAliases(): Record<string, string> {
|
||||
return fileURLToPath(import.meta.resolve(specifier));
|
||||
};
|
||||
|
||||
const piCodingAgentEntry = packageIndex;
|
||||
const piAgentCoreEntry = resolveWorkspaceOrImport("agent/dist/index.js", "@earendil-works/pi-agent-core");
|
||||
const piTuiEntry = resolveWorkspaceOrImport("tui/dist/index.js", "@earendil-works/pi-tui");
|
||||
const piAiEntry = resolveWorkspaceOrImport("ai/dist/index.js", "@earendil-works/pi-ai");
|
||||
const piAiOauthEntry = resolveWorkspaceOrImport("ai/dist/oauth.js", "@earendil-works/pi-ai/oauth");
|
||||
|
||||
_aliases = {
|
||||
"@mariozechner/pi-coding-agent": packageIndex,
|
||||
"@mariozechner/pi-agent-core": resolveWorkspaceOrImport("agent/dist/index.js", "@mariozechner/pi-agent-core"),
|
||||
"@mariozechner/pi-tui": resolveWorkspaceOrImport("tui/dist/index.js", "@mariozechner/pi-tui"),
|
||||
"@mariozechner/pi-ai": resolveWorkspaceOrImport("ai/dist/index.js", "@mariozechner/pi-ai"),
|
||||
"@mariozechner/pi-ai/oauth": resolveWorkspaceOrImport("ai/dist/oauth.js", "@mariozechner/pi-ai/oauth"),
|
||||
"@earendil-works/pi-coding-agent": piCodingAgentEntry,
|
||||
"@earendil-works/pi-agent-core": piAgentCoreEntry,
|
||||
"@earendil-works/pi-tui": piTuiEntry,
|
||||
"@earendil-works/pi-ai": piAiEntry,
|
||||
"@earendil-works/pi-ai/oauth": piAiOauthEntry,
|
||||
"@mariozechner/pi-coding-agent": piCodingAgentEntry,
|
||||
"@mariozechner/pi-agent-core": piAgentCoreEntry,
|
||||
"@mariozechner/pi-tui": piTuiEntry,
|
||||
"@mariozechner/pi-ai": piAiEntry,
|
||||
"@mariozechner/pi-ai/oauth": piAiOauthEntry,
|
||||
typebox: typeboxEntry,
|
||||
"typebox/compile": typeboxCompileEntry,
|
||||
"typebox/value": typeboxValueEntry,
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* Extension runner - executes extensions and manages their lifecycle.
|
||||
*/
|
||||
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { ImageContent, Model } from "@mariozechner/pi-ai";
|
||||
import type { KeyId } from "@mariozechner/pi-tui";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { ImageContent, Model } from "@earendil-works/pi-ai";
|
||||
import type { KeyId } from "@earendil-works/pi-tui";
|
||||
import { type Theme, theme } from "../../modes/interactive/theme/theme.js";
|
||||
import type { ResourceDiagnostic } from "../diagnostics.js";
|
||||
import type { KeybindingsConfig } from "../keybindings.js";
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
AgentToolUpdateCallback,
|
||||
ThinkingLevel,
|
||||
ToolExecutionMode,
|
||||
} from "@mariozechner/pi-agent-core";
|
||||
} from "@earendil-works/pi-agent-core";
|
||||
import type {
|
||||
Api,
|
||||
AssistantMessageEvent,
|
||||
@@ -27,7 +27,7 @@ import type {
|
||||
SimpleStreamOptions,
|
||||
TextContent,
|
||||
ToolResultMessage,
|
||||
} from "@mariozechner/pi-ai";
|
||||
} from "@earendil-works/pi-ai";
|
||||
import type {
|
||||
AutocompleteItem,
|
||||
AutocompleteProvider,
|
||||
@@ -38,7 +38,7 @@ import type {
|
||||
OverlayHandle,
|
||||
OverlayOptions,
|
||||
TUI,
|
||||
} from "@mariozechner/pi-tui";
|
||||
} from "@earendil-works/pi-tui";
|
||||
import type { Static, TSchema } from "typebox";
|
||||
import type { Theme } from "../../modes/interactive/theme/theme.js";
|
||||
import type { BashResult } from "../bash-executor.js";
|
||||
@@ -226,12 +226,12 @@ export interface ExtensionUIContext {
|
||||
* - `keybindings`: KeybindingsManager for app-level keybindings
|
||||
*
|
||||
* For full app keybinding support (escape, ctrl+d, model switching, etc.),
|
||||
* extend `CustomEditor` from `@mariozechner/pi-coding-agent` and call
|
||||
* extend `CustomEditor` from `@earendil-works/pi-coding-agent` and call
|
||||
* `super.handleInput(data)` for keys you don't handle.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* import { CustomEditor } from "@mariozechner/pi-coding-agent";
|
||||
* import { CustomEditor } from "@earendil-works/pi-coding-agent";
|
||||
*
|
||||
* class VimEditor extends CustomEditor {
|
||||
* private mode: "normal" | "insert" = "insert";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Tool call and tool result interception is handled by AgentSession via agent-core hooks.
|
||||
*/
|
||||
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { wrapToolDefinition, wrapToolDefinitions } from "../tools/tool-definition-wrapper.js";
|
||||
import type { ExtensionRunner } from "./runner.js";
|
||||
import type { RegisteredTool } from "./types.js";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
type KeyId,
|
||||
TUI_KEYBINDINGS,
|
||||
KeybindingsManager as TuiKeybindingsManager,
|
||||
} from "@mariozechner/pi-tui";
|
||||
} from "@earendil-works/pi-tui";
|
||||
import { existsSync, readFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
import { getAgentDir } from "../config.js";
|
||||
@@ -56,7 +56,7 @@ export interface AppKeybindings {
|
||||
|
||||
export type AppKeybinding = keyof AppKeybindings;
|
||||
|
||||
declare module "@mariozechner/pi-tui" {
|
||||
declare module "@earendil-works/pi-tui" {
|
||||
interface Keybindings extends AppKeybindings {}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* and provides a transformer to convert them to LLM-compatible messages.
|
||||
*/
|
||||
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { ImageContent, Message, TextContent } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { ImageContent, Message, TextContent } from "@earendil-works/pi-ai";
|
||||
|
||||
export const COMPACTION_SUMMARY_PREFIX = `The conversation history before this point was compacted into the following summary:
|
||||
|
||||
@@ -67,7 +67,7 @@ export interface CompactionSummaryMessage {
|
||||
}
|
||||
|
||||
// Extend CustomAgentMessages via declaration merging
|
||||
declare module "@mariozechner/pi-agent-core" {
|
||||
declare module "@earendil-works/pi-agent-core" {
|
||||
interface CustomAgentMessages {
|
||||
bashExecution: BashExecutionMessage;
|
||||
custom: CustomMessage;
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
registerApiProvider,
|
||||
resetApiProviders,
|
||||
type SimpleStreamOptions,
|
||||
} from "@mariozechner/pi-ai";
|
||||
import { registerOAuthProvider, resetOAuthProviders } from "@mariozechner/pi-ai/oauth";
|
||||
} from "@earendil-works/pi-ai";
|
||||
import { registerOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
|
||||
import { existsSync, readFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
import { type Static, Type } from "typebox";
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Model resolution, scoping, and initial selection
|
||||
*/
|
||||
|
||||
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import { type Api, type KnownProvider, type Model, modelsAreEqual } from "@mariozechner/pi-ai";
|
||||
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import { type Api, type KnownProvider, type Model, modelsAreEqual } from "@earendil-works/pi-ai";
|
||||
import chalk from "chalk";
|
||||
import { minimatch } from "minimatch";
|
||||
import { isValidThinkingLevel } from "../cli/args.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { join } from "node:path";
|
||||
import { Agent, type AgentMessage, type ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import { clampThinkingLevel, type Message, type Model, streamSimple } from "@mariozechner/pi-ai";
|
||||
import { Agent, type AgentMessage, type ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import { clampThinkingLevel, type Message, type Model, streamSimple } from "@earendil-works/pi-ai";
|
||||
import { getAgentDir } from "../config.js";
|
||||
import { AgentSession } from "./agent-session.js";
|
||||
import { formatNoModelsAvailableMessage } from "./auth-guidance.js";
|
||||
@@ -164,7 +164,7 @@ function getAttributionHeaders(
|
||||
* const { session } = await createAgentSession();
|
||||
*
|
||||
* // With explicit model
|
||||
* import { getModel } from '@mariozechner/pi-ai';
|
||||
* import { getModel } from '@earendil-works/pi-ai';
|
||||
* const { session } = await createAgentSession({
|
||||
* model: getModel('anthropic', 'claude-opus-4-5'),
|
||||
* thinkingLevel: 'high',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { ImageContent, Message, TextContent } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { ImageContent, Message, TextContent } from "@earendil-works/pi-ai";
|
||||
import { randomUUID } from "crypto";
|
||||
import {
|
||||
appendFileSync,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Transport } from "@mariozechner/pi-ai";
|
||||
import type { Transport } from "@earendil-works/pi-ai";
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
||||
import { homedir } from "os";
|
||||
import { dirname, join } from "path";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { existsSync } from "node:fs";
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { Container, Text, truncateToWidth } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { Container, Text, truncateToWidth } from "@earendil-works/pi-tui";
|
||||
import { spawn } from "child_process";
|
||||
import { type Static, Type } from "typebox";
|
||||
import { keyHint } from "../../modes/interactive/components/keybinding-hints.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { Box, Container, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { Box, Container, Spacer, Text } from "@earendil-works/pi-tui";
|
||||
import { constants } from "fs";
|
||||
import { access as fsAccess, readFile as fsReadFile, writeFile as fsWriteFile } from "fs/promises";
|
||||
import { type Static, Type } from "typebox";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createInterface } from "node:readline";
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { Text } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { Text } from "@earendil-works/pi-tui";
|
||||
import { spawn } from "child_process";
|
||||
import { existsSync } from "fs";
|
||||
import path from "path";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createInterface } from "node:readline";
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { Text } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { Text } from "@earendil-works/pi-tui";
|
||||
import { spawn } from "child_process";
|
||||
import { readFileSync, statSync } from "fs";
|
||||
import path from "path";
|
||||
|
||||
@@ -68,7 +68,7 @@ export {
|
||||
type WriteToolOptions,
|
||||
} from "./write.js";
|
||||
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { ToolDefinition } from "../extensions/types.js";
|
||||
import { type BashToolOptions, createBashTool, createBashToolDefinition } from "./bash.js";
|
||||
import { createEditTool, createEditToolDefinition, type EditToolOptions } from "./edit.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { Text } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { Text } from "@earendil-works/pi-tui";
|
||||
import { existsSync, readdirSync, statSync } from "fs";
|
||||
import nodePath from "path";
|
||||
import { type Static, Type } from "typebox";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { basename, dirname, isAbsolute, relative, resolve as resolvePath, sep } from "node:path";
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { Api, ImageContent, Model, TextContent } from "@mariozechner/pi-ai";
|
||||
import { Text } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { Api, ImageContent, Model, TextContent } from "@earendil-works/pi-ai";
|
||||
import { Text } from "@earendil-works/pi-tui";
|
||||
import { constants } from "fs";
|
||||
import { access as fsAccess, readFile as fsReadFile } from "fs/promises";
|
||||
import { type Static, Type } from "typebox";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as os from "node:os";
|
||||
import type { ImageContent, TextContent } from "@mariozechner/pi-ai";
|
||||
import { getCapabilities, getImageDimensions, imageFallback } from "@mariozechner/pi-tui";
|
||||
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
||||
import { getCapabilities, getImageDimensions, imageFallback } from "@earendil-works/pi-tui";
|
||||
import stripAnsi from "strip-ansi";
|
||||
import { sanitizeBinaryOutput } from "../../utils/shell.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import type { ExtensionContext, ToolDefinition } from "../extensions/types.js";
|
||||
|
||||
/** Wrap a ToolDefinition into an AgentTool for the core runtime. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
||||
import { Container, Text } from "@mariozechner/pi-tui";
|
||||
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { Container, Text } from "@earendil-works/pi-tui";
|
||||
import { mkdir as fsMkdir, writeFile as fsWriteFile } from "fs/promises";
|
||||
import { dirname } from "path";
|
||||
import { type Static, Type } from "typebox";
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
import { resolve } from "node:path";
|
||||
import { createInterface } from "node:readline";
|
||||
import { type ImageContent, modelsAreEqual } from "@mariozechner/pi-ai";
|
||||
import { ProcessTerminal, setKeybindings, TUI } from "@mariozechner/pi-tui";
|
||||
import { type ImageContent, modelsAreEqual } from "@earendil-works/pi-ai";
|
||||
import { ProcessTerminal, setKeybindings, TUI } from "@earendil-works/pi-tui";
|
||||
import chalk from "chalk";
|
||||
import { type Args, type Mode, parseArgs, printHelp } from "./cli/args.js";
|
||||
import { processFileArguments } from "./cli/file-processor.js";
|
||||
|
||||
@@ -9,8 +9,9 @@ import { CONFIG_DIR_NAME, getAgentDir, getBinDir } from "./config.js";
|
||||
import { migrateKeybindingsConfig } from "./core/keybindings.js";
|
||||
|
||||
const MIGRATION_GUIDE_URL =
|
||||
"https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration";
|
||||
const EXTENSIONS_DOC_URL = "https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/extensions.md";
|
||||
"https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration";
|
||||
const EXTENSIONS_DOC_URL =
|
||||
"https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/extensions.md";
|
||||
|
||||
/**
|
||||
* Migrate legacy oauth.json and settings.json apiKeys to auth.json.
|
||||
@@ -78,7 +79,7 @@ export function migrateAuthToAuthJson(): string[] {
|
||||
* ~/.pi/agent/sessions/<encoded-cwd>/. This migration moves them
|
||||
* to the correct location based on the cwd in their session header.
|
||||
*
|
||||
* See: https://github.com/badlogic/pi-mono/issues/320
|
||||
* See: https://github.com/earendil-works/pi-mono/issues/320
|
||||
*/
|
||||
export function migrateSessionsFromAgentRoot(): void {
|
||||
const agentDir = getAgentDir();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
/**
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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";
|
||||
|
||||
/**
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* - `pi --mode json "prompt"` - JSON event stream
|
||||
*/
|
||||
|
||||
import type { AssistantMessage, ImageContent } from "@mariozechner/pi-ai";
|
||||
import type { AssistantMessage, ImageContent } from "@earendil-works/pi-ai";
|
||||
import type { AgentSessionRuntime } from "../core/agent-session-runtime.js";
|
||||
import { flushRawStdout, writeRawStdout } from "../core/output-guard.js";
|
||||
import { killTrackedDetachedChildren } from "../utils/shell.js";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
import { type ChildProcess, spawn } from "node:child_process";
|
||||
import type { AgentEvent, AgentMessage, ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { ImageContent } from "@mariozechner/pi-ai";
|
||||
import type { AgentEvent, AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import type { ImageContent } from "@earendil-works/pi-ai";
|
||||
import type { SessionStats } from "../../core/agent-session.js";
|
||||
import type { BashResult } from "../../core/bash-executor.js";
|
||||
import type { CompactionResult } from "../../core/compaction/index.js";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* Responses and events are emitted as JSON lines on stdout.
|
||||
*/
|
||||
|
||||
import type { AgentMessage, ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { ImageContent, Model } from "@mariozechner/pi-ai";
|
||||
import type { AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
||||
import type { ImageContent, Model } from "@earendil-works/pi-ai";
|
||||
import type { SessionStats } from "../../core/agent-session.js";
|
||||
import type { BashResult } from "../../core/bash-executor.js";
|
||||
import type { CompactionResult } from "../../core/compaction/index.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ImageContent } from "@mariozechner/pi-ai";
|
||||
import type { ImageContent } from "@earendil-works/pi-ai";
|
||||
import { applyExifOrientation } from "./exif-orientation.js";
|
||||
import { loadPhoton } from "./photon.js";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user