diff --git a/src/agents/agent-paths.ts b/src/agents/agent-paths.ts index 15861d145a1..c3d70c445ab 100644 --- a/src/agents/agent-paths.ts +++ b/src/agents/agent-paths.ts @@ -11,14 +11,3 @@ export function resolveOpenClawAgentDir(env: NodeJS.ProcessEnv = process.env): s const defaultAgentDir = path.join(resolveStateDir(env), "agents", DEFAULT_AGENT_ID, "agent"); return resolveUserPath(defaultAgentDir, env); } - -export function ensureOpenClawAgentEnv(): string { - const dir = resolveOpenClawAgentDir(); - if (!process.env.OPENCLAW_AGENT_DIR) { - process.env.OPENCLAW_AGENT_DIR = dir; - } - if (!process.env.PI_CODING_AGENT_DIR) { - process.env.PI_CODING_AGENT_DIR = dir; - } - return dir; -} diff --git a/src/poll-params.ts b/src/poll-params.ts index 4c2dc6dcf4b..a19ac5fb142 100644 --- a/src/poll-params.ts +++ b/src/poll-params.ts @@ -25,17 +25,12 @@ export const POLL_CREATION_PARAM_DEFS: Record = { ...TELEGRAM_POLL_CREATION_PARAM_DEFS, }; -export type SharedPollCreationParamName = keyof typeof SHARED_POLL_CREATION_PARAM_DEFS; -export type TelegramPollCreationParamName = keyof typeof TELEGRAM_POLL_CREATION_PARAM_DEFS; -export type PollCreationParamName = keyof typeof POLL_CREATION_PARAM_DEFS; +type SharedPollCreationParamName = keyof typeof SHARED_POLL_CREATION_PARAM_DEFS; -export const POLL_CREATION_PARAM_NAMES = Object.keys(POLL_CREATION_PARAM_DEFS); +const POLL_CREATION_PARAM_NAMES = Object.keys(POLL_CREATION_PARAM_DEFS); export const SHARED_POLL_CREATION_PARAM_NAMES = Object.keys( SHARED_POLL_CREATION_PARAM_DEFS, ) as SharedPollCreationParamName[]; -export const TELEGRAM_POLL_CREATION_PARAM_NAMES = Object.keys( - TELEGRAM_POLL_CREATION_PARAM_DEFS, -) as TelegramPollCreationParamName[]; function readPollParamRaw(params: Record, key: string): unknown { return readSnakeCaseParamRaw(params, key); diff --git a/src/utils.ts b/src/utils.ts index 521e9229fc4..9ede64b6d45 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -7,7 +7,6 @@ import { resolveRequiredHomeDir, } from "./infra/home-dir.js"; import { isPlainObject } from "./infra/plain-object.js"; -import { formatTerminalLink } from "./terminal/terminal-link.js"; export async function ensureDir(dir: string) { await fs.promises.mkdir(dir, { recursive: true }); @@ -55,7 +54,7 @@ export function safeParseJson(raw: string): T | null { } } -export { formatTerminalLink, isPlainObject }; +export { isPlainObject }; /** * Type guard for Record (less strict than isPlainObject).