mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:00:43 +00:00
chore: remove unused exports
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -25,17 +25,12 @@ export const POLL_CREATION_PARAM_DEFS: Record<string, PollCreationParamDef> = {
|
||||
...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<string, unknown>, key: string): unknown {
|
||||
return readSnakeCaseParamRaw(params, key);
|
||||
|
||||
@@ -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<T>(raw: string): T | null {
|
||||
}
|
||||
}
|
||||
|
||||
export { formatTerminalLink, isPlainObject };
|
||||
export { isPlainObject };
|
||||
|
||||
/**
|
||||
* Type guard for Record<string, unknown> (less strict than isPlainObject).
|
||||
|
||||
Reference in New Issue
Block a user