Add enable/disable management for book tools (characters, worlds, and locations)
- Introduced toggling functionality for managing `characters`, `worlds`, and `locations` tool availability per book. - Updated `CharacterComponent`, `WorldSetting`, and `LocationComponent` with toggle switches for tool enablement. - Added `book_tools` database table and related schema migration for storing tool settings. - Extended API calls, models, and IPC handlers to support tool enablement states. - Localized new strings for English with supporting descriptions and messages. - Adjusted conditional rendering logic across components to respect tool enablement.
This commit is contained in:
@@ -57,6 +57,12 @@ export interface SyncedBook {
|
||||
aiGuideLine: SyncedAIGuideLine | null;
|
||||
}
|
||||
|
||||
export interface BookToolsSettings {
|
||||
characters: boolean;
|
||||
worlds: boolean;
|
||||
locations: boolean;
|
||||
}
|
||||
|
||||
export interface BookProps {
|
||||
bookId: string;
|
||||
type: string;
|
||||
@@ -72,6 +78,7 @@ export interface BookProps {
|
||||
localBook?: boolean;
|
||||
chapters?: ChapterProps[];
|
||||
quillsenseEnabled?: boolean;
|
||||
tools?: BookToolsSettings;
|
||||
}
|
||||
|
||||
export interface BookListProps {
|
||||
|
||||
@@ -163,6 +163,11 @@ export interface CharacterProps {
|
||||
history?: string;
|
||||
}
|
||||
|
||||
export interface CharacterListResponse {
|
||||
characters: CharacterProps[];
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export interface CharacterElement {
|
||||
title: string;
|
||||
section: keyof CharacterProps;
|
||||
|
||||
@@ -42,6 +42,11 @@ export interface WorldProps {
|
||||
importantCharacters: WorldElement[];
|
||||
}
|
||||
|
||||
export interface WorldListResponse {
|
||||
worlds: WorldProps[];
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export const elementSections: ElementSection[] = [
|
||||
{
|
||||
title: 'Lois',
|
||||
|
||||
Reference in New Issue
Block a user