fix: remove duplicate + New button, keep only + New Session
- Removed + New button from history header - Only + New Session button remains for creating sessions
This commit is contained in:
@@ -31,7 +31,6 @@
|
|||||||
<div class="bkh">
|
<div class="bkh">
|
||||||
<span class="bkht">History</span>
|
<span class="bkht">History</span>
|
||||||
<div class="bkh-actions">
|
<div class="bkh-actions">
|
||||||
<button class="bkh-btn" title="New Chat" @click="startNewChat">+ New</button>
|
|
||||||
<button class="bkx" @click="showHistory = false">x</button>
|
<button class="bkx" @click="showHistory = false">x</button>
|
||||||
</div>
|
</div>
|
||||||
<button class="hs-new-btn" @click="handleNewSession">+ New Session</button>
|
<button class="hs-new-btn" @click="handleNewSession">+ New Session</button>
|
||||||
@@ -799,10 +798,13 @@ async function handleSelectSession(s: SearchSession) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleNewSession() {
|
async function handleNewSession() {
|
||||||
const newSession = await createSession('未命名搜尋', mode.value)
|
const now = new Date()
|
||||||
|
const timeStr = `${now.getFullYear()}/${(now.getMonth()+1).toString().padStart(2,'0')}/${now.getDate().toString().padStart(2,'0')} ${now.getHours().toString().padStart(2,'0')}:${now.getMinutes().toString().padStart(2,'0')}`
|
||||||
|
const newSession = await createSession(timeStr, mode.value)
|
||||||
if (newSession) {
|
if (newSession) {
|
||||||
setCurrentSession(newSession)
|
setCurrentSession(newSession)
|
||||||
messages.value = []
|
messages.value = []
|
||||||
|
await loadSessions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user