31 lines
948 B
JavaScript
31 lines
948 B
JavaScript
/** Shared conversation data; controllers receive an instance rather than owning globals. */
|
|
export function createConversationState() {
|
|
return {
|
|
isProcessing: false,
|
|
activeChatId: null,
|
|
editingPersonaId: null,
|
|
editingPersonaType: "assistant",
|
|
currentUsername: "",
|
|
regenerationChatId: null,
|
|
chatSessions: [],
|
|
currentMessages: [],
|
|
historyPage: null,
|
|
historyLoading: false,
|
|
assistantPersonas: [],
|
|
userPersonas: [],
|
|
activeUserPersonaId: null,
|
|
currentSummary: null,
|
|
publishedPersonaIds: new Set(),
|
|
roleplayPresetCharacterId: null,
|
|
roleplayStarterStep: 1,
|
|
messageRetryState: new Map(),
|
|
chatSearchResults: null,
|
|
chatSearchError: "",
|
|
chatSearchTimer: null,
|
|
chatSearchRequest: 0,
|
|
chatOpenRequest: 0,
|
|
chatDrafts: new Map(),
|
|
sendingChatId: null
|
|
};
|
|
}
|