mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
refactor(plugins): localize internal declarations (#102021)
This commit is contained in:
parent
22376d80e1
commit
bdc1ce8ded
3 changed files with 6 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ import {
|
|||
} from "./shiki-curated-languages.js";
|
||||
import type { DiffViewerPayload } from "./types.js";
|
||||
|
||||
export const BASE_DIFF_VIEWER_LANGUAGE_HINTS = [
|
||||
const BASE_DIFF_VIEWER_LANGUAGE_HINTS = [
|
||||
...Object.keys(bundledLanguagesBase),
|
||||
"text",
|
||||
"ansi",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export const VIEWER_LOADER_PATH = `${VIEWER_ASSET_PREFIX}viewer.js`;
|
|||
export const VIEWER_RUNTIME_PATH = `${VIEWER_ASSET_PREFIX}viewer-runtime.js`;
|
||||
export const LANGUAGE_PACK_VIEWER_ASSET_PREFIX = "/plugins/diffs-language-pack/assets/";
|
||||
export const LANGUAGE_PACK_VIEWER_LOADER_PATH = `${LANGUAGE_PACK_VIEWER_ASSET_PREFIX}viewer.js`;
|
||||
export const LANGUAGE_PACK_VIEWER_RUNTIME_PATH = `${LANGUAGE_PACK_VIEWER_ASSET_PREFIX}viewer-runtime.js`;
|
||||
const LANGUAGE_PACK_VIEWER_RUNTIME_PATH = `${LANGUAGE_PACK_VIEWER_ASSET_PREFIX}viewer-runtime.js`;
|
||||
const VIEWER_RUNTIME_RELATIVE_IMPORT_PATH = "./viewer-runtime.js";
|
||||
const VIEWER_RUNTIME_CANDIDATE_RELATIVE_PATHS = [
|
||||
"./assets/viewer-runtime.js",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const FILE_WRITE_HARD_MAX_BYTES = 16 * 1024 * 1024;
|
|||
const PAIRED_NODE_DESCRIPTION =
|
||||
"Existing paired node id, display name, or IP shown by nodes status. Do not use local, host, gateway, or auto; use local file/exec tools for local workspace paths.";
|
||||
|
||||
export const FileFetchToolSchema = Type.Object({
|
||||
const FileFetchToolSchema = Type.Object({
|
||||
node: Type.String({
|
||||
description: PAIRED_NODE_DESCRIPTION,
|
||||
}),
|
||||
|
|
@ -46,7 +46,7 @@ export const FILE_FETCH_TOOL_DESCRIPTOR: FileTransferToolDescriptor = {
|
|||
parameters: FileFetchToolSchema,
|
||||
};
|
||||
|
||||
export const DirListToolSchema = Type.Object({
|
||||
const DirListToolSchema = Type.Object({
|
||||
node: Type.String({
|
||||
description: PAIRED_NODE_DESCRIPTION,
|
||||
}),
|
||||
|
|
@ -75,7 +75,7 @@ export const DIR_LIST_TOOL_DESCRIPTOR: FileTransferToolDescriptor = {
|
|||
parameters: DirListToolSchema,
|
||||
};
|
||||
|
||||
export const DirFetchToolSchema = Type.Object({
|
||||
const DirFetchToolSchema = Type.Object({
|
||||
node: Type.String({
|
||||
description: PAIRED_NODE_DESCRIPTION,
|
||||
}),
|
||||
|
|
@ -104,7 +104,7 @@ export const DIR_FETCH_TOOL_DESCRIPTOR: FileTransferToolDescriptor = {
|
|||
parameters: DirFetchToolSchema,
|
||||
};
|
||||
|
||||
export const FileWriteToolSchema = Type.Object({
|
||||
const FileWriteToolSchema = Type.Object({
|
||||
node: Type.String({ description: PAIRED_NODE_DESCRIPTION }),
|
||||
path: Type.String({
|
||||
description: "Absolute path on the node to write. Canonicalized server-side.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue