feat(openclaw): add Workspace Files panel for managing bootstrap md files

Add a dedicated panel to read/write OpenClaw's 6 workspace bootstrap files
(AGENTS.md, SOUL.md, USER.md, IDENTITY.md, TOOLS.md, MEMORY.md) directly
from ~/.openclaw/workspace/, with a whitelist-secured backend and Markdown
editor UI. Also fix prompt auto-import missing OpenCode/OpenClaw and the
PromptFormPanel filenameMap type exclusion.
This commit is contained in:
Jason
2026-02-07 21:42:36 +08:00
parent 182015264c
commit 705cc8a5af
13 changed files with 360 additions and 4 deletions
+1
View File
@@ -9,6 +9,7 @@ export { vscodeApi } from "./vscode";
export { proxyApi } from "./proxy";
export { openclawApi } from "./openclaw";
export { sessionsApi } from "./sessions";
export { workspaceApi } from "./workspace";
export * as configApi from "./config";
export type { ProviderSwitchEvent } from "./providers";
export type { Prompt } from "./prompts";
+11
View File
@@ -0,0 +1,11 @@
import { invoke } from "@tauri-apps/api/core";
export const workspaceApi = {
async readFile(filename: string): Promise<string | null> {
return invoke<string | null>("read_workspace_file", { filename });
},
async writeFile(filename: string, content: string): Promise<void> {
return invoke<void>("write_workspace_file", { filename, content });
},
};