mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-07 01:21:37 +00:00
* feat(web): make session header metadata configurable * fix(web): align mobile header metadata priority
27 lines
663 B
TypeScript
27 lines
663 B
TypeScript
export type SessionHeaderSecondaryMetadataKey =
|
|
| 'model'
|
|
| 'reasoning'
|
|
| 'machine'
|
|
| 'lastActive'
|
|
| 'updatedAt'
|
|
| 'createdAt'
|
|
| 'worktree'
|
|
| 'fastMode'
|
|
|
|
const MOBILE_SECONDARY_PRIORITY: ReadonlyArray<SessionHeaderSecondaryMetadataKey> = [
|
|
'machine',
|
|
'lastActive',
|
|
'model',
|
|
'reasoning',
|
|
'fastMode',
|
|
'createdAt',
|
|
'updatedAt',
|
|
'worktree',
|
|
]
|
|
|
|
export function selectMobileSessionHeaderSecondary(
|
|
available: Partial<Record<SessionHeaderSecondaryMetadataKey, boolean>>
|
|
): SessionHeaderSecondaryMetadataKey | null {
|
|
return MOBILE_SECONDARY_PRIORITY.find((key) => available[key] === true) ?? null
|
|
}
|