Some checks failed
CI / build-check-test (push) Has been cancelled
Document main/upstream-sync/feature branch strategy, add sync/push scripts, track .pi/agent extensions and webui in git, and disable startup changelog via showChangelogOnStartup. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
724 B
TypeScript
23 lines
724 B
TypeScript
import { apiGet, apiPost } from "./client";
|
|
import type { AvatarSettings, SettingsData } from "../types/events";
|
|
|
|
export function fetchSettings(): Promise<SettingsData> {
|
|
return apiGet("/api/settings");
|
|
}
|
|
|
|
export function fetchAvatars(): Promise<AvatarSettings> {
|
|
return apiGet("/api/avatars");
|
|
}
|
|
|
|
export function reloadSettings(): Promise<{ ok?: boolean }> {
|
|
return apiPost("/api/settings/reload");
|
|
}
|
|
|
|
export function saveSystemPrompt(systemPrompt: string): Promise<{ systemPromptPath?: string }> {
|
|
return apiPost("/api/settings/system-prompt", { systemPrompt });
|
|
}
|
|
|
|
export function saveAvatars(avatars: AvatarSettings): Promise<AvatarSettings & { ok?: boolean }> {
|
|
return apiPost("/api/settings/avatars", avatars);
|
|
}
|