mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 00:12:11 +00:00
tweak: split out title before newline
This commit is contained in:
parent
a68111ca77
commit
913c3ae799
1 changed files with 1 additions and 1 deletions
|
|
@ -1902,7 +1902,7 @@ export namespace SessionPrompt {
|
|||
.then((result) => {
|
||||
if (result.text)
|
||||
return Session.update(input.session.id, (draft) => {
|
||||
const cleaned = result.text.replace(/<think>[\s\S]*?<\/think>\s*/g, "")
|
||||
const cleaned = result.text.replace(/<think>[\s\S]*?<\/think>\s*/g, "").split("\n")[0]
|
||||
const title = cleaned.length > 100 ? cleaned.substring(0, 97) + "..." : cleaned
|
||||
draft.title = title.trim()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue