chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-11 03:36:12 +00:00
parent 47a45601fd
commit 51b10b128e
6 changed files with 11 additions and 16 deletions

View File

@ -88,9 +88,7 @@ export function DialogModel(props: { providerID?: string }) {
filter((option) => {
if (!showSections) return true
if (
favorites.some(
(item) => item.providerID === option.value.providerID && item.modelID === option.value.modelID,
)
favorites.some((item) => item.providerID === option.value.providerID && item.modelID === option.value.modelID)
)
return false
if (

View File

@ -555,11 +555,10 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
result.location.reference.refresh(),
result.location.command.refresh(),
result.location.skill.refresh(),
])
.then((settled) => {
for (const failure of settled.filter((item) => item.status === "rejected"))
console.error("Failed to refresh default location data", failure.reason)
})
]).then((settled) => {
for (const failure of settled.filter((item) => item.status === "rejected"))
console.error("Failed to refresh default location data", failure.reason)
})
})
return result

View File

@ -231,7 +231,9 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
}
}
const model = models().find((item) => item.enabled && providers().some((provider) => provider.id === item.providerID))
const model = models().find(
(item) => item.enabled && providers().some((provider) => provider.id === item.providerID),
)
if (!model) return undefined
return {
providerID: model.providerID,

View File

@ -17,8 +17,7 @@ function Directory(props: { api: TuiPluginApi }) {
const selected = destination?.destination()
const directory = !selected || selected.type === "new" ? data.location.default().directory : selected.directory
const out = abbreviateHome(directory, paths.home)
const branch =
directory === (props.api.state.path.directory || paths.cwd) ? props.api.state.vcs?.branch : undefined
const branch = directory === (props.api.state.path.directory || paths.cwd) ? props.api.state.vcs?.branch : undefined
if (branch) return out + ":" + branch
return out
})

View File

@ -46,9 +46,7 @@ test("refreshes resources into reactive getters", async () => {
if (url.pathname === "/api/agent")
return json({
location,
data: [
{ id: "build", request: { headers: {}, body: {} }, mode: "primary", hidden: false, permissions: [] },
],
data: [{ id: "build", request: { headers: {}, body: {} }, mode: "primary", hidden: false, permissions: [] }],
})
return undefined
})

View File

@ -59,8 +59,7 @@ export function createFetch(override?: FetchHandler) {
if (url.pathname === "/config/providers") return json({ providers: {}, default: {} })
if (url.pathname === "/experimental/console") return json({ consoleManagedProviders: [], switchableOrgCount: 0 })
if (url.pathname === "/path") return json({ home: "", state: "", config: "", worktree, directory })
if (url.pathname === "/api/location")
return json({ directory, project: { id: "proj_test", directory: worktree } })
if (url.pathname === "/api/location") return json({ directory, project: { id: "proj_test", directory: worktree } })
if (["/api/agent", "/api/model", "/api/provider", "/api/command", "/api/skill"].includes(url.pathname))
return json({
location: { directory, project: { id: "proj_test", directory: worktree } },