feat: enhance ClawHub integration with new CLI paths and IPC handlers for config and skills directories (#41)

This commit is contained in:
Felix
2026-02-11 11:32:03 +08:00
committed by GitHub
Unverified
parent 177cf4c1ea
commit a0505490cd
6 changed files with 129 additions and 25 deletions

View File

@@ -21,7 +21,7 @@ import {
isEncryptionAvailable,
type ProviderConfig,
} from '../utils/secure-storage';
import { getOpenClawStatus, getOpenClawDir } from '../utils/paths';
import { getOpenClawStatus, getOpenClawDir, getOpenClawConfigDir, getOpenClawSkillsDir } from '../utils/paths';
import { getOpenClawCliCommand, installOpenClawCliMac } from '../utils/openclaw-cli';
import { getSetting } from '../utils/store';
import { saveProviderKeyToOpenClaw, setOpenClawDefaultModel } from '../utils/openclaw-auth';
@@ -506,6 +506,16 @@ function registerOpenClawHandlers(): void {
return getOpenClawDir();
});
// Get the OpenClaw config directory (~/.openclaw)
ipcMain.handle('openclaw:getConfigDir', () => {
return getOpenClawConfigDir();
});
// Get the OpenClaw skills directory (~/.openclaw/skills)
ipcMain.handle('openclaw:getSkillsDir', () => {
return getOpenClawSkillsDir();
});
// Get a shell command to run OpenClaw CLI without modifying PATH
ipcMain.handle('openclaw:getCliCommand', () => {
try {