feat: ship v0.3.0 with P2.1 editor polish and P3 AI collaboration

Add chapter reorder, search replace, inspiration capture, and AI chat with context editing, settings, offline handling, and naming checks. Fix dev black screen by keeping process.env reads in the main process only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 16:33:56 +08:00
parent 0b5aa146bd
commit 8ce35a1e8e
59 changed files with 3808 additions and 100 deletions
@@ -7,11 +7,13 @@ import { useEditStore } from '@renderer/stores/useEditStore'
export function ReferencePanel(): React.JSX.Element {
const { t } = useTranslation()
const open = useReferenceStore((s) => s.open)
const pinned = useReferenceStore((s) => s.pinned)
const tab = useReferenceStore((s) => s.tab)
const query = useReferenceStore((s) => s.query)
const setTab = useReferenceStore((s) => s.setTab)
const setQuery = useReferenceStore((s) => s.setQuery)
const setOpen = useReferenceStore((s) => s.setOpen)
const setPinned = useReferenceStore((s) => s.setPinned)
const switchTarget = useEditStore((s) => s.switchTarget)
const outlines = useBookStore((s) => s.outlines)
const settings = useBookStore((s) => s.settings)
@@ -43,9 +45,28 @@ export function ReferencePanel(): React.JSX.Element {
<div id="reference-panel" className="open" data-testid="reference-panel">
<div className="ref-header">
<span>{t('reference.title')}</span>
<button type="button" className="btn" onClick={() => setOpen(false)}>
</button>
<div className="ref-header-actions">
<button
type="button"
className={`btn ref-pin-btn ${pinned ? 'active' : ''}`}
data-testid="reference-pin"
title={pinned ? t('reference.unpin') : t('reference.pin')}
onClick={() => setPinned(!pinned)}
>
📌
</button>
<button
type="button"
className="btn"
data-testid="reference-close"
onClick={() => {
if (pinned) setPinned(false)
else setOpen(false)
}}
>
{pinned ? t('reference.unpin') : '✕'}
</button>
</div>
</div>
<input
className="form-control form-control--wide"