build(config): refactored build and TypeScript configuration with Bun loaders
- Removed WASM generation script; use Bun `wasm?raw` loader for imports. - Added bunfig.toml with loaders for `.md`, `.py`, and `.wasm?raw` text imports. - Added types/assets/index.d.ts for global TypeScript module declarations. - Unified TypeScript configuration with tsgo-based checking across monorepo. - Removed build and WASM steps from install and publish pipelines.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import { mkdirSync, unlinkSync } from "node:fs";
|
||||
import { dirname } from "node:path";
|
||||
import { resolveToCwd } from "@oh-my-pi/pi-coding-agent/tools/path-utils";
|
||||
import { resolveToCwd } from "../tools/path-utils";
|
||||
import { DEFAULT_FUZZY_THRESHOLD, findContextLine, findMatch, seekSequence } from "./fuzzy";
|
||||
import {
|
||||
adjustIndentation,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* used when not in patch mode.
|
||||
*/
|
||||
|
||||
import { resolveToCwd } from "@oh-my-pi/pi-coding-agent/tools/path-utils";
|
||||
import * as Diff from "diff";
|
||||
import { resolveToCwd } from "../tools/path-utils";
|
||||
import { previewPatch } from "./applicator";
|
||||
import { DEFAULT_FUZZY_THRESHOLD, findMatch } from "./fuzzy";
|
||||
import { adjustIndentation, normalizeToLF, stripBom } from "./normalize";
|
||||
|
||||
@@ -11,20 +11,20 @@
|
||||
import { mkdir } from "node:fs/promises";
|
||||
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
||||
import { StringEnum } from "@oh-my-pi/pi-ai";
|
||||
import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { renderPromptTemplate } from "../config/prompt-templates";
|
||||
import {
|
||||
createLspWritethrough,
|
||||
type FileDiagnosticsResult,
|
||||
flushLspWritethroughBatch,
|
||||
type WritethroughCallback,
|
||||
writethroughNoop,
|
||||
} from "@oh-my-pi/pi-coding-agent/lsp";
|
||||
import patchDescription from "@oh-my-pi/pi-coding-agent/prompts/tools/patch.md" with { type: "text" };
|
||||
import replaceDescription from "@oh-my-pi/pi-coding-agent/prompts/tools/replace.md" with { type: "text" };
|
||||
import type { ToolSession } from "@oh-my-pi/pi-coding-agent/tools";
|
||||
import { outputMeta } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
|
||||
import { resolveToCwd } from "@oh-my-pi/pi-coding-agent/tools/path-utils";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
} from "../lsp";
|
||||
import patchDescription from "../prompts/tools/patch.md" with { type: "text" };
|
||||
import replaceDescription from "../prompts/tools/replace.md" with { type: "text" };
|
||||
import type { ToolSession } from "../tools";
|
||||
import { outputMeta } from "../tools/output-meta";
|
||||
import { resolveToCwd } from "../tools/path-utils";
|
||||
import { applyPatch } from "./applicator";
|
||||
import { generateDiffString, generateUnifiedDiffString, replaceText } from "./diff";
|
||||
import { DEFAULT_FUZZY_THRESHOLD, findMatch } from "./fuzzy";
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
*/
|
||||
|
||||
import type { ToolCallContext } from "@oh-my-pi/pi-agent-core";
|
||||
import type { RenderResultOptions } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
||||
import type { FileDiagnosticsResult } from "@oh-my-pi/pi-coding-agent/lsp";
|
||||
import { renderDiff as renderDiffColored } from "@oh-my-pi/pi-coding-agent/modes/components/diff";
|
||||
import { getLanguageFromPath, type Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
||||
import type { OutputMeta } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
|
||||
import type { Component } from "@oh-my-pi/pi-tui";
|
||||
import { Text } from "@oh-my-pi/pi-tui";
|
||||
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
||||
import type { FileDiagnosticsResult } from "../lsp";
|
||||
import { renderDiff as renderDiffColored } from "../modes/components/diff";
|
||||
import { getLanguageFromPath, type Theme } from "../modes/theme/theme";
|
||||
import type { OutputMeta } from "../tools/output-meta";
|
||||
import {
|
||||
formatExpandHint,
|
||||
formatStatusIcon,
|
||||
@@ -15,11 +17,9 @@ import {
|
||||
shortenPath,
|
||||
ToolUIKit,
|
||||
truncateDiffByHunk,
|
||||
} from "@oh-my-pi/pi-coding-agent/tools/render-utils";
|
||||
import type { RenderCallOptions } from "@oh-my-pi/pi-coding-agent/tools/renderers";
|
||||
import { renderStatusLine } from "@oh-my-pi/pi-coding-agent/tui";
|
||||
import type { Component } from "@oh-my-pi/pi-tui";
|
||||
import { Text } from "@oh-my-pi/pi-tui";
|
||||
} from "../tools/render-utils";
|
||||
import type { RenderCallOptions } from "../tools/renderers";
|
||||
import { renderStatusLine } from "../tui";
|
||||
import type { DiffError, DiffResult, Operation } from "./types";
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user