Move config.ts from utils/ to src/
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
import type { Agent, AgentEvent, AgentState, AppMessage, Attachment, ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { AssistantMessage, Model } from "@mariozechner/pi-ai";
|
||||
import { getModelsPath } from "../utils/config.js";
|
||||
import { getModelsPath } from "../config.js";
|
||||
import { type BashResult, executeBash as executeBashCommand } from "./bash-executor.js";
|
||||
import { calculateContextTokens, compact, shouldCompact } from "./compaction.js";
|
||||
import { exportSessionToHtml } from "./export-html.js";
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { AssistantMessage, Message, ToolResultMessage, UserMessage } from "
|
||||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { homedir } from "os";
|
||||
import { basename } from "path";
|
||||
import { APP_NAME, VERSION } from "../utils/config.js";
|
||||
import { APP_NAME, VERSION } from "../config.js";
|
||||
import { type BashExecutionMessage, isBashExecutionMessage } from "./messages.js";
|
||||
import type { SessionManager } from "./session-manager.js";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { type Api, getApiKey, getModels, getProviders, type KnownProvider, type
|
||||
import { type Static, Type } from "@sinclair/typebox";
|
||||
import AjvModule from "ajv";
|
||||
import { existsSync, readFileSync } from "fs";
|
||||
import { getModelsPath } from "../utils/config.js";
|
||||
import { getModelsPath } from "../config.js";
|
||||
import { getOAuthToken, type SupportedOAuthProvider } from "./oauth/index.js";
|
||||
import { loadOAuthCredentials } from "./oauth/storage.js";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
||||
import { getAgentDir, getOAuthPath } from "../../utils/config.js";
|
||||
import { getAgentDir, getOAuthPath } from "../../config.js";
|
||||
|
||||
export interface OAuthCredentials {
|
||||
type: "oauth";
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { AgentState, AppMessage } from "@mariozechner/pi-agent-core";
|
||||
import { randomBytes } from "crypto";
|
||||
import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync } from "fs";
|
||||
import { join, resolve } from "path";
|
||||
import { getAgentDir } from "../utils/config.js";
|
||||
import { getAgentDir } from "../config.js";
|
||||
|
||||
function uuidv4(): string {
|
||||
const bytes = randomBytes(16);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import { getAgentDir } from "../utils/config.js";
|
||||
import { getAgentDir } from "../config.js";
|
||||
|
||||
export interface CompactionSettings {
|
||||
enabled?: boolean; // default: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { existsSync, readdirSync, readFileSync } from "fs";
|
||||
import { join, resolve } from "path";
|
||||
import { CONFIG_DIR_NAME, getCommandsDir } from "../utils/config.js";
|
||||
import { CONFIG_DIR_NAME, getCommandsDir } from "../config.js";
|
||||
|
||||
/**
|
||||
* Represents a custom slash command loaded from a file
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import chalk from "chalk";
|
||||
import { existsSync, readFileSync } from "fs";
|
||||
import { join, resolve } from "path";
|
||||
import { getAgentDir, getReadmePath } from "../utils/config.js";
|
||||
import { getAgentDir, getReadmePath } from "../config.js";
|
||||
import type { ToolName } from "./tools/index.js";
|
||||
|
||||
/** Tool descriptions for system prompt */
|
||||
|
||||
Reference in New Issue
Block a user