|
@@ -104,7 +104,6 @@ export default function NovelContextManager({
|
|
|
const [showPipeline, setShowPipeline] = useState(false);
|
|
const [showPipeline, setShowPipeline] = useState(false);
|
|
|
const [showCloseConfirm, setShowCloseConfirm] = useState(false);
|
|
const [showCloseConfirm, setShowCloseConfirm] = useState(false);
|
|
|
const [marathonMode, setMarathonMode] = useState(false);
|
|
const [marathonMode, setMarathonMode] = useState(false);
|
|
|
- const [savedNotification, setSavedNotification] = useState(false);
|
|
|
|
|
const [selectedTemplateId, setSelectedTemplateId] = useState<string>(() => {
|
|
const [selectedTemplateId, setSelectedTemplateId] = useState<string>(() => {
|
|
|
if (typeof window !== 'undefined') {
|
|
if (typeof window !== 'undefined') {
|
|
|
return localStorage.getItem(TEMPLATE_STORAGE_KEY) || PROMPT_TEMPLATES[0].id;
|
|
return localStorage.getItem(TEMPLATE_STORAGE_KEY) || PROMPT_TEMPLATES[0].id;
|
|
@@ -210,8 +209,6 @@ export default function NovelContextManager({
|
|
|
setShowPipeline(false);
|
|
setShowPipeline(false);
|
|
|
try {
|
|
try {
|
|
|
await saveChapter(content, chapterTitle);
|
|
await saveChapter(content, chapterTitle);
|
|
|
- setSavedNotification(true);
|
|
|
|
|
- setTimeout(() => setSavedNotification(false), 3000);
|
|
|
|
|
|
|
|
|
|
// Background agents: RollingSummarizer every 5 chapters, MilestoneAudit every 20
|
|
// Background agents: RollingSummarizer every 5 chapters, MilestoneAudit every 20
|
|
|
const newChapterIndex = chapters.length + 1;
|
|
const newChapterIndex = chapters.length + 1;
|
|
@@ -445,16 +442,6 @@ export default function NovelContextManager({
|
|
|
{currentPhase !== 'phase1' && currentPhase !== 'phase3' && (
|
|
{currentPhase !== 'phase1' && currentPhase !== 'phase3' && (
|
|
|
<>
|
|
<>
|
|
|
<div className="flex-1 flex flex-col">
|
|
<div className="flex-1 flex flex-col">
|
|
|
- {/* Saved notification */}
|
|
|
|
|
- {savedNotification && (
|
|
|
|
|
- <div className="mx-5 mt-3 px-4 py-2 bg-green-50 border border-green-200 rounded-lg text-sm text-green-700 flex items-center gap-2 shrink-0">
|
|
|
|
|
- <svg className="w-4 h-4 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
|
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
|
|
|
|
|
- </svg>
|
|
|
|
|
- 已自动保存
|
|
|
|
|
- </div>
|
|
|
|
|
- )}
|
|
|
|
|
-
|
|
|
|
|
{/* Prompt template selector */}
|
|
{/* Prompt template selector */}
|
|
|
<div className="px-5 py-3 bg-white border-b border-gray-100 shrink-0">
|
|
<div className="px-5 py-3 bg-white border-b border-gray-100 shrink-0">
|
|
|
<div className="flex items-center gap-2">
|
|
<div className="flex items-center gap-2">
|