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:
natreex
2026-01-14 17:42:59 -05:00
parent 7215ac5c4f
commit e45a15225b
19 changed files with 782 additions and 341 deletions

View File

@@ -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 {

View File

@@ -163,6 +163,11 @@ export interface CharacterProps {
history?: string;
}
export interface CharacterListResponse {
characters: CharacterProps[];
enabled: boolean;
}
export interface CharacterElement {
title: string;
section: keyof CharacterProps;

View File

@@ -42,6 +42,11 @@ export interface WorldProps {
importantCharacters: WorldElement[];
}
export interface WorldListResponse {
worlds: WorldProps[];
enabled: boolean;
}
export const elementSections: ElementSection[] = [
{
title: 'Lois',