Commit Graph
17 Commits
Author SHA1 Message Date
Garfield Lee 93f26a5714 chore: include browser test for provider-inference package (#2446)
## Description

<!-- Please insert your description here and especially provide info
about the "what" this PR is solving -->

## Linked Issues

<!-- Optional, if you have any -->

## Additional Context

<!-- e.g. is there anything you'd like reviewers to focus on? -->
2026-09-02 20:02:10 +08:00
Garfield Lee 59a064ea80 refactor(stage-ui): extract provider-inference package for runtime-neutral definitions (#2444)
## Summary

Extract runtime-neutral provider definitions from `@proj-airi/stage-ui`
into a new `@proj-airi/provider-inference` package that runs in both
Node.js and browser without Vue/Pinia dependencies.

## What changed

- **New package** `packages/provider-inference/` — owns
`ProviderDefinition`, `ProviderRegistry`, validators, and all provider
modules (cloud + local)
- **Provider modules relocated** — ~45 providers moved from
`stage-ui/src/libs/providers/providers/` to
`provider-inference/src/providers/cloud/` and
`provider-inference/src/providers/local/`
- **Type decoupling** — `ProviderContext.t` changed from
`ComposerTranslation` (Vue) to generic `ProviderTranslator`, removing
the Vue dependency from core types
- **stage-ui types slimmed** — `types.ts` now re-exports from
`provider-inference` and only adds the Vue-specific `ProviderViews`
extension
- **validators/run.ts** — becomes a pass-through re-export
- **Registry** — portable `createProviderRegistry()` with deterministic
ordering and duplicate-id detection

## Verification

```bash
pnpm -F @proj-airi/provider-inference typecheck
pnpm -F @proj-airi/provider-inference test:node
pnpm -F @proj-airi/provider-inference test:browser
pnpm -F @proj-airi/provider-inference build
pnpm -F @proj-airi/stage-ui typecheck
pnpm -F @proj-airi/stage-web typecheck
pnpm -F @proj-airi/stage-tamagotchi typecheck
pnpm lint
```

## Why

Provider definitions were tightly coupled to Vue (`ComposerTranslation`,
`Component`), preventing reuse in non-Vue runtimes (Node.js services,
tests, future Electron backend). This extraction creates a clean
boundary: runtime-neutral definitions live in `provider-inference`,
while Vue/Pinia-specific concerns stay in `stage-ui`.
2026-09-02 19:35:25 +08:00
Garfield Lee cfd9c26f09 feat(stage-tamagotchi-godot): migrate C# projects to .NET 10 (#2169) 2026-08-02 18:43:24 +08:00
Garfield Lee 911572fe80 chore(i18n): remove redundant closing tag and change to YAML literal string (#1992) 2026-06-19 02:05:57 +08:00
Garfield Lee fab9cc3b14 chore(i18n): remove useless quotes (#1945)
## Description

Remove some useless quotes
2026-06-04 16:37:44 +08:00
Garfield Lee 9538068d0b fix(docs): Try Live leads to 404 in VitePress SPA router (#1461)
- Add `target?: string` field to `ButtonItem` interface
- Set `target: '_self'` on all locales' Try Live button configs (EN, ZH, JA)
- Bind `:target="item.target"` on the `<a>` element in HomeButton.vue

VitePress intercepts clicks on anchor tags without an explicit `target`
attribute and routes them through Vue Router, which causes a 404 for the
external https://airi.moeru.ai/ link. Setting `target="_self"` makes
the browser skip the router and perform a native navigation.

Co-authored-by-agent: GitHub Copilot <copilot@github.com>
2026-03-24 10:15:57 +08:00
Garfield Lee 4a29598037 feat(stage-*): refactor settings data page and add app data folder action (#1447)
------

Co-authored-by-agent: Codex
2026-03-22 04:39:46 +08:00
Garfield Lee e64c2cc5db feat(stage-pages): reorder sections and add danger zone red background
- Move desktop-specific (amber) section before danger zone for better severity progression
- Add red border/background to danger zone card for visual prominence
- Remove redundant inner card backgrounds (white/red-950) since outer card now has red tinting
- Flatten one layer of nesting in danger zone item layout

Co-authored-by-agent: GitHub Copilot
2026-03-20 20:20:26 +08:00
Garfield Lee 28a8970984 chore(skills): add project-level skills (#1373)
Co-authored-by-agent: GitHub Copilot <copilot@github.com>
2026-03-16 00:19:06 +08:00
Garfield LeeandGitHub Copilot 617c037aa2 fix(stage-ui): use nullish coalescing for errorMessageFrom fallback (#1370)
Replace bare errorMessageFrom(error) assignments and the existing
|| 'Unknown error' pattern with ?? 'Unknown error' to correctly
handle string | undefined return type without swallowing empty strings.

Affected locations:
- src/libs/providers/validators/run.ts (5 sites)
- src/composables/use-provider-validation.ts (1 site)

Co-authored-by: GitHub Copilot <copilot@github.com>
2026-03-15 12:17:02 +08:00
Garfield Lee 9fc9955615 release: v0.9.0-alpha.15 2026-03-14 18:23:50 +08:00
Garfield Lee a991360e8b chore: update pnpm version to 10.32.1 (#1252) 2026-03-11 10:12:04 +08:00
92e75d86fb feat(stage-tamagotchi): add electron main process file logger hook (#1247)
* feat(stage-tamagotchi): add electron main process file logger hook

* chore: code update

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: update comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* chore: code style update

Co-authored-by: RainbowBird <rbxin2003@outlook.com>

* chore: code style update

Co-authored-by: RainbowBird <rbxin2003@outlook.com>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
2026-03-10 23:33:48 +08:00
Garfield Lee 3ece47759e fix(stage-ui): reset always-on-top via manual reset (#1218) 2026-03-09 23:19:30 +08:00
Garfield Lee 86c0d9d28a feat(stage-ui): add Ollama thinking mode config and provider-side think mapping (#1140) 2026-03-05 20:46:45 +08:00
Garfield Lee 53c424818d chore(i18n): make dev tools name consistently (#1078) 2026-03-02 23:04:47 +08:00
Garfield Lee b630db0860 fix(stage-ui): add bottom padding to settings data and ripple-grid layouts (#1053) 2026-03-01 01:55:19 +08:00