Commit Graph
1173 Commits
Author SHA1 Message Date
leafyy aa69ee62b5 refactor(lipsync): share renderer vowel policy (#2374)
## Description

The VRM and MMD renderers had the same two boundary problems:

- Both imported the Stage audio store from the `stage-ui` source tree.
- Both kept copies of the wLipSync profile and model-neutral vowel
policy.

This PR solves both problems as one architecture change.

```text
Stage owns AudioContext and the current audio source
  -> ThreeScene / MMDScene receive both as inputs
    -> model-driver-lipsync owns the profile and shared vowel policy
      -> VRM maps AEIOU to aa / ee / ih / oh / ou
      -> MMD maps AEIOU to vowelA / vowelE / vowelI / vowelO / vowelU
```

The shared driver owns viseme projection, winner and runner selection,
silence handling, and smoothing. It has no Vue, Three.js, VRM, or MMD
dependency. Each renderer keeps only its model-specific mapping.

The renderer packages no longer import the Stage audio store or depend
directly on `wlipsync`. Stage passes the owning `AudioContext` down with
the current audio source. Cleanup disconnects only the wLipSync node
owned by that renderer.

## Current solution

The package-boundary review identified two related findings:

- Finding 3: The VRM and MMD renderers imported `stage-ui` audio state
through source paths.
- Finding 4: The same renderers duplicated the wLipSync profile and
model-neutral vowel policy.

Both findings came from one missing boundary between Stage, the lip-sync
driver, and the renderer adapters. This PR fixes that boundary with one
ownership change.

| Layer | Responsibility |
| --- | --- |
| `stage-ui` | Owns the `AudioContext` and the current audio source. It
passes both values to each renderer. |
| `stage-ui-three` and `stage-ui-mmd` | Connect renderer components to
the shared driver. They do not import the Stage audio store. |
| `model-driver-lipsync/runtime/wlipsync` | Exposes `createWLipSyncNode`
as the public runtime entry. |
| `model-driver-lipsync/shared/wlipsync` | Owns the profile, public
types, and model-neutral vowel policy. |

Runtime flow:

1. `Stage.vue` passes `audioContext` and `currentAudioSource` to
`ThreeScene` or `MMDScene`.
2. The renderer composable watches the context and creates one wLipSync
node for that context.
3. The source watcher connects the current audio source to that node.
4. Each render frame sends the wLipSync values to
`createWLipSyncVowelDriver`.
5. The renderer adapter applies the returned AEIOU weights to its model
controls.
6. Cleanup disconnects the exact source and node pair that the renderer
owns.

The shared policy keeps the current renderer behavior:

- It maps the raw `S` viseme to `I`.
- It selects the two strongest vowels.
- It uses the existing volume and silence thresholds.
- It keeps the 160 ms silence window.
- It keeps the existing attack, release, cap, and output scale values.

The renderer-specific mappings stay in their renderer packages:

- VRM maps AEIOU to `aa`, `ee`, `ih`, `oh`, and `ou`.
- MMD maps AEIOU to `vowelA`, `vowelE`, `vowelI`, `vowelO`, and
`vowelU`.

This solution removes both duplicate profile files. It also removes the
direct `wlipsync` dependencies from both renderer packages.

## Linked Issues

None.

## Additional Context

There is no intended visual change. This refactor preserves the existing
vowel weights and renderer mappings.

Verification:

- `sem diff --staged --no-cosmetics -v --file-exts .ts .tsx`
- `sem diff --staged --no-cosmetics -v --file-exts .vue`
- `sem impact --entity-id <useVRMLipSync> --json --dependents`
- `sem impact --entity-id <useMMDLipSync> --json --dependents`
- `pnpm -F @proj-airi/model-driver-lipsync test` — 3 tests passed
- `pnpm -F @proj-airi/stage-ui-three exec vitest run` — 18 tests passed
- `pnpm -F @proj-airi/stage-ui-mmd exec vitest run` — 23 tests passed
- Type checks passed for `model-driver-lipsync`, `stage-ui-three`,
`stage-ui-mmd`, and `stage-ui`
- `pnpm install --frozen-lockfile --ignore-scripts`
- `pnpm lint` — 0 errors and 7 existing warnings outside this change
- `git diff --check`

The full workspace `pnpm typecheck` was also run. In the isolated
worktree it stopped in unchanged `electron-vueuse` and
`plugin-sdk-tamagotchi` because their generated dependency outputs were
not present. All affected package type checks above passed.
2026-08-31 14:58:43 +08:00
Neko d8e62f12f0 fix(ci): remove incomplete release tests (#2407) 2026-08-30 03:11:51 +08:00
Neko Ayaka 2c1e223c8d release: v0.12.0-beta.5 2026-08-30 02:31:30 +08:00
Neko 0977bcd741 feat(stage-ui): improve Live2D import diagnostics (#2406) 2026-08-30 01:48:37 +08:00
Lovehsigure_520 da2ac8bbcc fix(ui): standardize scrollable areas (#2399) 2026-08-29 22:34:24 +08:00
RinandNeko Ayaka 8ddb35353e feat(stage-tamagotchi,stage-ui-live2d): procedural motion generation (#2376)
---------

Co-authored-by: Neko Ayaka <neko@ayaka.moe>
2026-08-29 18:15:28 +08:00
Neko 898a62e3b4 fix(stage-ui): bottom-align mobile chat messages (#2398) 2026-08-29 12:45:36 +08:00
Makito 1e7c468c03 feat(provider): add voicevox family speech providers (#2383)
## Description

Adds the VOICEVOX engine family as text-to-speech providers. Two
catalogue entries share one adapter:

- `voicevox` — VOICEVOX ENGINE, default `http://localhost:50021/`
- `aivis-speech` — AivisSpeech Engine, default `http://localhost:10101/`

<img width="1203" height="976" alt="Screenshot 2026-08-28 at 23 33 30"
src="https://github.com/user-attachments/assets/ae475852-ccc0-4bd7-81ea-9e9ba2f75e31"
/>

<img width="1203" height="976" alt="Screenshot 2026-08-28 at 23 34 14"
src="https://github.com/user-attachments/assets/f83f73a9-ee76-4a91-a2fc-907b361beb0d"
/>

## Linked Issues

Closes #2166
2026-08-28 19:46:27 +00:00
Neko 434f8de2be fix(stage-ui): remove the chat session initialization race (#2394) 2026-08-29 03:35:31 +08:00
Neko Ayaka fe38fb9ded release: v0.12.0-beta.4 2026-08-28 04:59:05 +08:00
Neko Ayaka 175ad08477 release: v0.12.0-beta.3 2026-08-27 20:48:27 +08:00
leafyy debe4019d1 refactor(stage-ui): use public package exports (#2373) 2026-08-27 17:08:44 +08:00
Neko Ayaka 146b3da65a Revert "style: lint"
This reverts commit 98f40d7d0b.
2026-08-26 20:13:10 +08:00
Neko Ayaka 98f40d7d0b style: lint 2026-08-26 19:49:58 +08:00
Neko Ayaka 6a24582696 chore(deps): bump dependencies 2026-08-26 19:01:04 +08:00
Neko Ayaka f53e82a9b3 release: v0.12.0-beta.2 2026-08-26 04:17:25 +08:00
Neko 6299dd0919 fix(stage-ui): stabilize connection status animation (#2365) 2026-08-26 04:14:53 +08:00
Neko 95cc685b1b feat(stage-tamagotchi): add Apple Speech transcription (#2364) 2026-08-25 17:41:43 +00:00
Ryanba ca40f6ea7a fix(providers): support OpenAI models requiring max_completion_tokens (#2251) 2026-08-25 20:37:27 +08:00
Neko 636c023945 fix(stage-ui): use compatible chat validation token limit (#2361) 2026-08-25 19:50:36 +08:00
Neko 584cc96cd8 refactor(stage-ui): support async provider definitions (#2360) 2026-08-25 15:39:44 +08:00
Neko eb5cdbe71a fix(stage-pocket): use system browser for authentication (#2355) 2026-08-25 13:54:03 +08:00
Neko e2376736af fix(stage-ui): align module provider visibility with auth (#2353) 2026-08-24 21:27:58 +08:00
Neko Ayaka f14a7ac9a1 release: v0.12.0-beta.1 2026-08-24 03:55:37 +08:00
Neko d0bf3eb286 fix(stage-ui): preserve chat state across Electron windows (#2347) 2026-08-24 02:05:57 +08:00
Neko 0229c4f1d7 fix(stage-ui): use validator from provider definition for validating (#2346) 2026-08-24 01:36:29 +08:00
Neko f65e55bafc fix(stage-ui): persist provider validation status (#2345) 2026-08-23 18:24:30 +08:00
Neko f790a96d70 feat(stage-ui): add thinking model option (#2343) 2026-08-23 05:24:33 +08:00
Neko Ayaka bf74806024 fix(stage-web): better input and font 2026-08-23 00:39:50 +08:00
Neko 9694f282d6 fix(stage-web): better chat bubble animation (#2340) 2026-08-22 19:54:24 +08:00
Neko b6d0809ecb perf(stage-ui): virtualize chat history (#2334) 2026-08-21 05:32:21 +08:00
Neko a24d2496e4 fix(stage-ui): normalize tool schemas per provider (#2330) 2026-08-20 21:40:13 +08:00
leafyy 7756d921a7 fix(stage-ui): define deterministic chat math syntax (#2328) 2026-08-20 16:30:01 +08:00
RainbowBird f6969d07c5 feat(chat-ws): authenticate v2 after connect (#2309)
Signed-off-by: RainbowBird <git@luoling.moe>
2026-08-20 14:24:41 +08:00
RainbowBird d22daf6b4c feat(chat-ws): add versioned Eventa protocols (#2308)
Signed-off-by: RainbowBird <git@luoling.moe>
2026-08-20 12:24:47 +08:00
Neko Ayaka 702b4c862d feat(stage-tamagotchi): adaptive controls island 2026-08-19 23:30:57 +08:00
RainbowBird ae170f1ee0 fix(analytics): trim automatic product events (#2325) 2026-08-19 22:30:32 +08:00
Neko 4d68da4310 fix(stage-ui): unify module settings panels (#2327) 2026-08-19 18:14:38 +08:00
Mark Xianand冼健聪 db89aaeee3 fix(stage-ui): incorrect DeepSeek provider instance normalized (#2287)
## Summary
- show the DeepSeek thinking-mode control for configured provider
instances whose id is generated
- compare provider configs after filling omitted schema defaults so new
defaults like `thinkingMode: auto` do not mark old empty DeepSeek
configs as configured

## Tests
- `pnpm -rF @proj-airi/stage-ui run test:run
src/stores/providers/config-defaults.test.ts
src/libs/providers/providers/deepseek/index.test.ts`
- `pnpm exec moeru-lint
packages/stage-ui/src/stores/providers/config-defaults.ts
packages/stage-ui/src/stores/providers/config-defaults.test.ts
packages/stage-ui/src/stores/providers/provider.ts
packages/stage-pages/src/pages/settings/providers/chat/[providerId].vue`
- `git diff --check`

Co-authored-by: 冼健聪 <mark.xian@evenrealities.com>
2026-08-19 17:27:41 +08:00
葱姜蒜 abc8b62f9e fix(stage-ui): localize Volcengine model descriptions (#2323) 2026-08-19 17:17:32 +08:00
葱姜蒜 7de1f9d3a9 fix(stage-ui): update Volcengine Coding Plan models (#2321) 2026-08-19 14:18:33 +08:00
Neko 5e95e56d62 fix(stage-ui,stage-web,stage-tamagotchi): capture imported Live2D models in Polaroid (#2320) 2026-08-19 14:17:03 +08:00
Neko Ayaka 5c0916baa3 fix(stage-ui,stage-tamagotchi,stage-web,stage-pocket): incorrectly initialized 2026-08-19 04:17:21 +08:00
Neko 2770267dc7 fix(stage-tamagotchi): sync pairing settings and QR state (#2318) 2026-08-18 19:55:15 +00:00
Neko Ayaka d2b837fa01 fix(stage-ui,stage-tamagotchi,stage-web): infinite write config causing forever loading 2026-08-19 01:07:30 +08:00
RainbowBird d832137fde fix(analytics): remove model discovery events (#2312) 2026-08-18 11:41:10 +08:00
RainbowBird 07b26b530f fix(analytics): remove TS product events table (#2306) 2026-08-17 10:16:44 +00:00
AdairLi c4778686ff fix(stage-ui): flashing and unreadable validator (#2302)
## Description

Fix the flashing validator on the provider setting page which is unable
to read and interface. Now it is stable to show the status of the
provider and help users to do the further config.

## Linked Issues

#2301 


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved credential validation stability by preventing repeated
validation for equivalent credential values.
* Preserved debounced validation behavior and manual test state resets.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-17 11:24:20 +08:00
Neko 73c05d37eb fix(stage-tamagotchi): prevent auxiliary renderer request storms (#2304) 2026-08-16 22:08:18 +08:00
RainbowBird 44cd0cfe68 fix(stage-ui): normalize streaming transcription audio chunks (#2285) 2026-08-15 19:37:45 +08:00