Skip to content

Commit

Permalink
Task/admin UI tweak (#1058)
Browse files Browse the repository at this point in the history
- metrics adjust
  • Loading branch information
sceuick authored Oct 16, 2024
1 parent 81fdad5 commit 2421510
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
"stream-http": "^3.2.0",
"string_decoder": "^1.3.0",
"tailwindcss": "^3.3.2",
"typescript": "^5.4.4",
"typescript": "^5.4.5",
"url": "^0.11.1",
"util": "^0.12.3",
"values.js": "^2.1.1",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion srv/adapter/agnaistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export const handleAgnaistic: ModelAdapter = async function* (opts) {
}

const body = getThirdPartyPayload(opts, allStops)
body.api_key = key

yield { prompt }

Expand All @@ -252,7 +253,6 @@ export const handleAgnaistic: ModelAdapter = async function* (opts) {

const params = [
`type=text`,
`key=${key}`,
`id=${opts.user._id}`,
`model=${subPreset.subModel}`,
`level=${level}`,
Expand Down
4 changes: 3 additions & 1 deletion web/pages/Admin/Metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const MetricsPage: Component = () => {
}

const shas = createMemo(() => {
return Object.entries(state.metrics?.shas || {}).map(([sha, count]) => ({ sha, count }))
return Object.entries(state.metrics?.shas || {})
.map(([sha, count]) => ({ sha, count }))
.sort((l, r) => r.count - l.count)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion web/pages/Chat/components/ChatGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function getPathSkips(tree: ChatTree, id: string, flags: FeatureFlags): PathSkip
}

if (curr.children.size === 1) {
const next = curr.children.values().next().value
const next = curr.children.values().next().value!
if (visited.has(next)) {
throw new Error(`Invalid chat tree: Contains a circular reference (${next})`)
}
Expand Down

0 comments on commit 2421510

Please sign in to comment.