fixed
This commit is contained in:
@@ -29,6 +29,28 @@ export interface PomodoroStatus {
|
||||
finished_at?: string | null;
|
||||
}
|
||||
|
||||
export interface CharacterCardData {
|
||||
name: string;
|
||||
description: string;
|
||||
personality: string;
|
||||
scenario: string;
|
||||
first_mes: string;
|
||||
mes_example: string;
|
||||
system_prompt: string;
|
||||
post_history_instructions: string;
|
||||
tags: string[];
|
||||
creator: string;
|
||||
creator_notes: string;
|
||||
alternate_greetings: string[];
|
||||
character_version: string;
|
||||
}
|
||||
|
||||
export interface CharacterCardV2 {
|
||||
spec: string;
|
||||
spec_version: string;
|
||||
data: CharacterCardData;
|
||||
}
|
||||
|
||||
export interface PomodoroHistoryItem {
|
||||
id: number;
|
||||
status: string;
|
||||
@@ -129,4 +151,13 @@ export const api = {
|
||||
}),
|
||||
|
||||
pomodoroHistory: () => request<PomodoroHistoryItem[]>("/api/v1/pomodoro/history"),
|
||||
|
||||
getCharacter: () => request<CharacterCardV2>("/api/v1/character"),
|
||||
|
||||
saveCharacter: (card: CharacterCardV2) =>
|
||||
request<CharacterCardV2>("/api/v1/character", {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(card),
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user