mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-09 11:10:56 +00:00
fix(app): hide default session timestamps (#20892)
This commit is contained in:
parent
9d57f21f9f
commit
fbfa148e4e
3 changed files with 57 additions and 42 deletions
7
packages/app/src/utils/session-title.ts
Normal file
7
packages/app/src/utils/session-title.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const pattern = /^(New session|Child session) - \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/
|
||||
|
||||
export function sessionTitle(title?: string) {
|
||||
if (!title) return title
|
||||
const match = title.match(pattern)
|
||||
return match?.[1] ?? title
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue