fix(web): update landing CLI version

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
XiaoSeS 2026-09-09 18:09:34 +08:00
parent e856d356fc
commit e7c540ba6c
3 changed files with 12 additions and 12 deletions

View file

@ -23,9 +23,9 @@ test.describe('Landing access methods (Real API)', () => {
await expect(agentMode).toHaveAttribute('aria-pressed', 'false')
await expect(webMode).toHaveAttribute('aria-pressed', 'false')
await expect(page.getByText('npx -y @astron-team/skillhub@0.1.11 --version', { exact: true })).toBeVisible()
await expect(page.getByText(/npx -y @astron-team\/skillhub@0\.1\.11 search weather/)).toBeVisible()
await expect(page.getByText(/npx -y @astron-team\/skillhub@0\.1\.11 install @global\/weather/)).toBeVisible()
await expect(page.getByText('npx -y @astron-team/skillhub@0.1.12 --version', { exact: true })).toBeVisible()
await expect(page.getByText(/npx -y @astron-team\/skillhub@0\.1\.12 search weather/)).toBeVisible()
await expect(page.getByText(/npx -y @astron-team\/skillhub@0\.1\.12 install @global\/weather/)).toBeVisible()
await expect(page.getByRole('link', { name: 'CLI docs' })).toHaveAttribute(
'href',
'https://github.com/iflytek/skillhub/tree/main/cli',

View file

@ -64,11 +64,11 @@ describe('landing-quick-start module exports', () => {
await waitFor(() => {
expect(writeText).toHaveBeenNthCalledWith(
1,
'npx -y @astron-team/skillhub@0.1.11 search weather --registry https://registry.internal.example/skills --limit 5',
'npx -y @astron-team/skillhub@0.1.12 search weather --registry https://registry.internal.example/skills --limit 5',
)
expect(writeText).toHaveBeenNthCalledWith(
2,
'npx -y @astron-team/skillhub@0.1.11 install @global/weather --dir ./skills --registry https://registry.internal.example/skills',
'npx -y @astron-team/skillhub@0.1.12 install @global/weather --dir ./skills --registry https://registry.internal.example/skills',
)
})
})

View file

@ -170,10 +170,10 @@ function CliAccessPanel() {
<div className="flex items-start gap-2">
<span className="select-none font-bold text-emerald-600 dark:text-emerald-400">$</span>
<div className="flex-1">
<span className="text-neutral-800 dark:text-neutral-200">npx -y @astron-team/skillhub@0.1.11 --version</span>
<span className="text-neutral-800 dark:text-neutral-200">npx -y @astron-team/skillhub@0.1.12 --version</span>
<button
type="button"
onClick={() => handleCopy('npx -y @astron-team/skillhub@0.1.11 --version', 0)}
onClick={() => handleCopy('npx -y @astron-team/skillhub@0.1.12 --version', 0)}
className="ml-2 inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] text-muted-foreground align-middle transition-[color,background-color,transform] hover:bg-neutral-100 hover:text-foreground active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:hover:bg-neutral-800"
>
{copiedIdx === 0 ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}
@ -181,7 +181,7 @@ function CliAccessPanel() {
</button>
</div>
</div>
<div className="pl-5 text-muted-foreground">SkillHub CLI 0.1.11</div>
<div className="pl-5 text-muted-foreground">SkillHub CLI 0.1.12</div>
</div>
{/* Search */}
@ -189,10 +189,10 @@ function CliAccessPanel() {
<div className="flex items-start gap-2">
<span className="select-none font-bold text-emerald-600 dark:text-emerald-400">$</span>
<div className="flex-1">
<span className="text-neutral-800 dark:text-neutral-200">npx -y @astron-team/skillhub@0.1.11 search weather \</span>
<span className="text-neutral-800 dark:text-neutral-200">npx -y @astron-team/skillhub@0.1.12 search weather \</span>
<button
type="button"
onClick={() => handleCopy(`npx -y @astron-team/skillhub@0.1.11 search weather --registry ${registryUrl} --limit 5`, 1)}
onClick={() => handleCopy(`npx -y @astron-team/skillhub@0.1.12 search weather --registry ${registryUrl} --limit 5`, 1)}
className="ml-2 inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] text-muted-foreground align-middle transition-[color,background-color,transform] hover:bg-neutral-100 hover:text-foreground active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:hover:bg-neutral-800"
>
{copiedIdx === 1 ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}
@ -228,10 +228,10 @@ function CliAccessPanel() {
<div className="flex items-start gap-2">
<span className="select-none font-bold text-emerald-600 dark:text-emerald-400">$</span>
<div className="flex-1">
<span className="text-neutral-800 dark:text-neutral-200">npx -y @astron-team/skillhub@0.1.11 install @global/weather \</span>
<span className="text-neutral-800 dark:text-neutral-200">npx -y @astron-team/skillhub@0.1.12 install @global/weather \</span>
<button
type="button"
onClick={() => handleCopy(`npx -y @astron-team/skillhub@0.1.11 install @global/weather --dir ./skills --registry ${registryUrl}`, 2)}
onClick={() => handleCopy(`npx -y @astron-team/skillhub@0.1.12 install @global/weather --dir ./skills --registry ${registryUrl}`, 2)}
className="ml-2 inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] text-muted-foreground align-middle transition-[color,background-color,transform] hover:bg-neutral-100 hover:text-foreground active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:hover:bg-neutral-800"
>
{copiedIdx === 2 ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}