mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
feat: show failure message when model cannot be discovered
This commit is contained in:
@@ -42,6 +42,7 @@ type TrackerState = {
|
||||
generatePrevNd: number
|
||||
generateStartAt: number
|
||||
prevNdBySlot: Record<number, { baseline: number; hasIncreased: boolean }>
|
||||
failure: string | null
|
||||
}
|
||||
|
||||
function estimateStreamTokens(delta: string) {
|
||||
@@ -200,6 +201,7 @@ function SessionPromptRight(props: {
|
||||
})
|
||||
|
||||
const text = createMemo(() => {
|
||||
if (props.tracker.failure) return props.tracker.failure
|
||||
const pp = prefillRate()
|
||||
const tps = liveTps()
|
||||
if (props.tracker.isPrefilling && pp) {
|
||||
@@ -230,6 +232,7 @@ const tui: TuiPlugin = async (api) => {
|
||||
generatePrevNd: 0,
|
||||
generateStartAt: 0,
|
||||
prevNdBySlot: {},
|
||||
failure: null,
|
||||
}
|
||||
const [version, setVersion] = createSignal(0)
|
||||
const [clock, setClock] = createSignal(Date.now())
|
||||
@@ -294,6 +297,13 @@ const tui: TuiPlugin = async (api) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!model) {
|
||||
tracker.failure = "no model found"
|
||||
bump()
|
||||
return
|
||||
}
|
||||
tracker.failure = null
|
||||
|
||||
let anyPrefilling = false
|
||||
let anyGenerating = false
|
||||
let genEnded = false
|
||||
|
||||
Reference in New Issue
Block a user