root commited on
Commit
97bfa31
·
1 Parent(s): f184f08

书本锁横条只显示真实换书记录

Browse files
fanqie/dist/index.html CHANGED
@@ -8,7 +8,7 @@
8
  <title>小说写作台</title>
9
  <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%23b8432f'/%3E%3Ctext x='32' y='44' font-size='34' text-anchor='middle' fill='%23fff' font-family='serif'%3E%E6%96%87%3C/text%3E%3C/svg%3E" />
10
  <script>try{var t=localStorage.getItem('xs_theme');if(t==='night')document.documentElement.dataset.theme='night'}catch(e){}</script>
11
- <script type="module" crossorigin src="/assets/index-CZWtgNvq.js"></script>
12
  <link rel="stylesheet" crossorigin href="/assets/index-DP2cUhfJ.css">
13
  </head>
14
  <body>
 
8
  <title>小说写作台</title>
9
  <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%23b8432f'/%3E%3Ctext x='32' y='44' font-size='34' text-anchor='middle' fill='%23fff' font-family='serif'%3E%E6%96%87%3C/text%3E%3C/svg%3E" />
10
  <script>try{var t=localStorage.getItem('xs_theme');if(t==='night')document.documentElement.dataset.theme='night'}catch(e){}</script>
11
+ <script type="module" crossorigin src="/assets/index-B3Uxac13.js"></script>
12
  <link rel="stylesheet" crossorigin href="/assets/index-DP2cUhfJ.css">
13
  </head>
14
  <body>
public/assets/{index-CZWtgNvq.js → index-B3Uxac13.js} RENAMED
The diff for this file is too large to render. See raw diff
 
public/index.html CHANGED
@@ -8,7 +8,7 @@
8
  <title>小说写作台</title>
9
  <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%23b8432f'/%3E%3Ctext x='32' y='44' font-size='34' text-anchor='middle' fill='%23fff' font-family='serif'%3E%E6%96%87%3C/text%3E%3C/svg%3E" />
10
  <script>try{var t=localStorage.getItem('xs_theme');if(t==='night')document.documentElement.dataset.theme='night'}catch(e){}</script>
11
- <script type="module" crossorigin src="/assets/index-CZWtgNvq.js"></script>
12
  <link rel="stylesheet" crossorigin href="/assets/index-DP2cUhfJ.css">
13
  </head>
14
  <body>
 
8
  <title>小说写作台</title>
9
  <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%23b8432f'/%3E%3Ctext x='32' y='44' font-size='34' text-anchor='middle' fill='%23fff' font-family='serif'%3E%E6%96%87%3C/text%3E%3C/svg%3E" />
10
  <script>try{var t=localStorage.getItem('xs_theme');if(t==='night')document.documentElement.dataset.theme='night'}catch(e){}</script>
11
+ <script type="module" crossorigin src="/assets/index-B3Uxac13.js"></script>
12
  <link rel="stylesheet" crossorigin href="/assets/index-DP2cUhfJ.css">
13
  </head>
14
  <body>
ui-src/src/rooms/Shelf.tsx CHANGED
@@ -93,7 +93,7 @@ function FocusBar({ projects, focusId, focusTitle, history, reload }: { projects
93
  if (!(await confirm({ title: '解除书本锁?', body: '解除后写作 AI 能看到书房里所有书。它下次开工时会重新锁定一本。', ok: '解除' }))) return
94
  try { await agentApi.clearFocus(); toast('已解除', 'ok'); reload() } catch (e: any) { toast(e.message, 'err') }
95
  }
96
- const last = history[0]
97
  return (
98
  <div className={`focus-bar ${focusId ? 'on' : ''}`}>
99
  {focusId ? <Lock size={15} /> : <Unlock size={15} />}
 
93
  if (!(await confirm({ title: '解除书本锁?', body: '解除后写作 AI 能看到书房里所有书。它下次开工时会重新锁定一本。', ok: '解除' }))) return
94
  try { await agentApi.clearFocus(); toast('已解除', 'ok'); reload() } catch (e: any) { toast(e.message, 'err') }
95
  }
96
+ const last = history.find(h => h.from && h.from !== h.title && projects.some(p => p.title === h.from) && projects.some(p => p.title === h.title))
97
  return (
98
  <div className={`focus-bar ${focusId ? 'on' : ''}`}>
99
  {focusId ? <Lock size={15} /> : <Unlock size={15} />}