feat(provider): add provider and model sync feature with vendored generator (#378)

* feat(provider): vendor and adapt pi model generator

- Vendor generate-models.ts, model-data.ts, and models-dev-reasoning-options.ts from @earendil-works/pi tag v0.82.1
- Adapt imports to use @earendil-works/pi-ai and expose generateModels programmatic function
- Add compare.test.ts to verify vendored generator against original built-in catalog
- Add packages/core/src/provider/generator to eslint ignores

* feat(provider): add provider and model sync api and ui

* feat(webui): add checkbox for existing providers and clean dialog description

* feat(webui): add expand all and collapse all to sync providers dialog

* refactor(provider): remove compare.test.ts and cli overhead from generate-models

* fix(provider): add 30s timeout and strict error handling to sync catalog fetching

* fix(e2e): eliminate drag-and-drop race condition on webkit

Allow requestAnimationFrame collision updates to settle in dragCard helper before releasing pointer, and scope fileCard locator via data-testid to avoid matching sidebar tree items.
This commit is contained in:
Yiling-J
2026-09-03 21:01:14 +08:00
committed by GitHub
parent c3ef769f51
commit a236cd3a97
58 changed files with 5070 additions and 15 deletions
@@ -235,6 +235,7 @@ export function FileCard({
e.preventDefault()
}
}}
data-testid="file-card"
className={cn(
'group relative flex cursor-pointer select-none flex-col overflow-hidden rounded-xl border border-border bg-card transition-all hover:border-primary h-full m-1 outline-none focus:outline-none focus-visible:outline-none',
(isSelected || isChecked) && 'outline-1 outline-primary border-primary',
@@ -189,6 +189,7 @@ export function FileListItem({
e.preventDefault()
}
}}
data-testid="file-card"
className="group cursor-pointer select-none transition-colors whitespace-nowrap flex w-full outline-none focus:outline-none focus-visible:outline-none"
>
<div
@@ -276,6 +276,7 @@ export function FolderCard({
}
: undefined
}
data-testid="file-card"
className={cn(
'group relative w-full md:max-w-[340px] select-none cursor-pointer isolate flex flex-col items-center h-full outline-none focus:outline-none focus-visible:outline-none',
)}