feat(omp): add Oh My Pi support

Squashed from #6747 (head 50c3cec1d) onto current main: providers in
models.yml, MCP in mcp.json, Skills, sessions, app visibility and
directory override for Oh My Pi. Conflicts with the Kimi Code refresh
refactor in App.tsx and the locale files were resolved by keeping both
sides and routing Oh My Pi through refreshAdditiveLiveState.

Co-authored-by: allenxu09 <s23372.xu@stu.scie.com.cn>
This commit is contained in:
JackieJKandallenxu09 authored and Jason Young committed 2026-10-24 15:30:32 +08:00
1 parent d8983bb10b
commit c8945d2d91
108 files changed
+8558 -249

No files matched your search

@@ -73,6 +73,7 @@ describe("useDirectorySettings", () => {
if (app === "opencode") return "/remote/opencode";
if (app === "openclaw") return "/remote/openclaw";
if (app === "pi") return "/remote/pi";
if (app === "ohmypi") return "/remote/ohmypi";
return "/remote/hermes";
});
selectConfigDirectoryMock.mockReset();
@@ -98,6 +99,7 @@ describe("useDirectorySettings", () => {
openclaw: "/remote/openclaw",
hermes: "/remote/hermes",
pi: "/remote/pi",
ohmypi: "/remote/ohmypi",
});
});
@@ -35,6 +35,7 @@ function makeSkill(overrides: Partial<InstalledSkill> = {}): InstalledSkill {
openclaw: false,
hermes: false,
pi: false,
ohmypi: false,
},
installedAt: 0,
updatedAt: 0,
+31
View File
@@ -383,6 +383,37 @@ describe("useSettings hook", () => {
expect(invalidatePiDirectoryCachesMock).toHaveBeenCalledTimes(1);
});
it("auto-saves the persisted directory, not an unsaved draft", async () => {
// Directory rows only commit on the explicit Save button. An unrelated
// auto-save (a General tab toggle) must not smuggle the half-typed path in.
serverSettings = {
...serverSettings,
ohmypiConfigDir: "/server/omp",
hermesConfigDir: "/server/hermes",
};
useSettingsQueryMock.mockReturnValue({
data: serverSettings,
isLoading: false,
});
settingsFormMock = createSettingsFormMock({
settings: {
...serverSettings,
ohmypiConfigDir: "/draft/omp",
hermesConfigDir: "/draft/hermes",
},
});
const { result } = renderHook(() => useSettings());
await act(async () => {
await result.current.autoSaveSettings({ launchOnStartup: true });
});
const payload = mutateAsyncMock.mock.calls[0][0] as Settings;
expect(payload.ohmypiConfigDir).toBe("/server/omp");
expect(payload.hermesConfigDir).toBe("/server/hermes");
});
it("shows toast when Claude plugin sync fails but continues flow", async () => {
// 设置服务器状态为 false,本地状态为 true,触发状态变化
serverSettings = {