mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
fix(ci): align plugin inventory with current contracts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useId, useMemo, useState, type ReactNode } from 'react'
|
||||
import type { ClientRemote } from '@deepseek-ai/dsh-api-remotes/client'
|
||||
import type { PluginInventorySnapshot } from '@deepseek-ai/dsh-api-remotes/client'
|
||||
import {
|
||||
IconChevronDownOutline14,
|
||||
IconSearchOutline16,
|
||||
@@ -11,10 +11,9 @@ import css from './PluginSettingsSection.module.css'
|
||||
/** Registration-side Remote face used by the section. */
|
||||
export interface PluginSettingsSectionInjected {
|
||||
/** Read a current Host inventory snapshot. */
|
||||
list: ClientRemote['pluginInventory']['list']
|
||||
list: () => Promise<PluginInventorySnapshot>
|
||||
}
|
||||
|
||||
type PluginInventorySnapshot = Awaited<ReturnType<PluginSettingsSectionInjected['list']>>
|
||||
type PluginInventoryEntry = PluginInventorySnapshot['entries'][number]
|
||||
type PluginFiberPhase = PluginInventoryEntry['fiberPhase']
|
||||
|
||||
@@ -119,7 +118,7 @@ export function PluginSettingsSection({ list, t }: PluginSettingsSectionProps):
|
||||
value={query}
|
||||
placeholder={t('search')}
|
||||
aria-label={t('search')}
|
||||
onChange={event => setQuery(event.currentTarget.value)}
|
||||
onChange={(event) => { setQuery(event.currentTarget.value) }}
|
||||
/>
|
||||
</label>
|
||||
<div className={css.catalogHeading}>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** Read-only Host plugin inventory registered into Web Settings. */
|
||||
|
||||
import type { ClientRemote } from '@deepseek-ai/dsh-api-remotes/client'
|
||||
import type {} from '@deepseek-ai/dsh-client-locale/client'
|
||||
import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'
|
||||
import type {} from '@deepseek-ai/dsh-client-ui-settings/client'
|
||||
@@ -28,7 +27,13 @@ export function apply(ctx: ClientContext): void {
|
||||
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ui-plugins: dictionaries')
|
||||
|
||||
const t = ctx.locale.bind(NS)
|
||||
const list: ClientRemote['pluginInventory']['list'] = () => ctx.remote.pluginInventory.list()
|
||||
const list: PluginSettingsSectionInjected['list'] = async () => {
|
||||
const result = await ctx.remote.pluginInventory.list()
|
||||
if (!result.ok) {
|
||||
throw new Error(`pluginInventory.list failed: ${result.error.code}: ${result.error.message}`)
|
||||
}
|
||||
return result.value
|
||||
}
|
||||
const injected = (): PluginSettingsSectionInjected => ({ list })
|
||||
|
||||
ctx.slots.inject('settings.section', () => ctx.slots.register({
|
||||
|
||||
Reference in New Issue
Block a user