Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cloud/TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@
- **Acceptance:** "Account" tab appears, both panels render.

### C11 — Minimal additive edit to `AISettingsModal.tsx`
- [ ] **[BLOCKED: file currently has uncommitted work in progress (see git status). Lead, please commit or stash before unblocking.]**
- **When unblocked:** Add Lumina Cloud to the providers list display **only**. Do not touch the rehydrate / dirty-tracking logic that's currently being fixed.
- [x] **Goal:** Add Lumina Cloud to the providers list display **only**. Do not touch the rehydrate / dirty-tracking logic that's currently being fixed.

### C12 — End-to-end test: license → chat → usage
- [x] **Goal:** Vitest e2e test that exercises: insert fixture license → setLicense → verify visible in provider list → mock chat round-trip → assert usage counter would update.
Expand Down Expand Up @@ -139,3 +138,4 @@
[x] C3 — 2026-04-28 — d684a85 — license storage via safeStorage + Linux 0600 fallback; 3 additive lines in ipc.ts; 16 tests (11 main, 5 renderer)
[x] C10 — 2026-04-28 — 9873ab7 — Account tab mounted in SettingsModal between Network and System; locale strings in en/zh-CN/zh-TW/ja; 7 tests pass (existing modal tests + new account-tab assertion)
[x] C13 — 2026-04-28 — 0a47e8f — Optional: Lumina Cloud subsection added to README.en.md and README.zh-CN.md (4 lines each, brand-voice paragraph)
[x] C11 — 2026-04-28 — 101c3a1 — Lumina Cloud row added to AISettingsModal providers Select; visibility-gated by isLuminaCloudVisible; display-only, no rehydrate / dirty-tracking changes
24 changes: 20 additions & 4 deletions src/components/ai/AISettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import {
PROVIDER_MODELS,
type LLMProviderType,
} from "@/services/llm";
import {
LUMINA_CLOUD_PROVIDER,
LUMINA_CLOUD_PROVIDER_ID,
isLuminaCloudVisible,
} from "@/services/llm/providers/luminaCloud";
import { useLicenseStore } from "@/stores/useLicenseStore";
import { invoke } from "@/lib/host";
import {
getRecommendedTemperature,
Expand Down Expand Up @@ -167,6 +173,8 @@ export function AISettingsContent() {
}, [savedConfig]);

const errorMessages = t.aiSettings.errors as Record<string, string>;
const licenseFeatures = useLicenseStore((s) => s.payload?.features);
const licenseFeaturesForCloud = isLuminaCloudVisible(licenseFeatures);
const providerMeta = PROVIDER_MODELS[config.provider as LLMProviderType];
const mainModelMeta = getModelMeta(config.provider as LLMProviderType, config.model);
const effectiveModelForTemp =
Expand Down Expand Up @@ -301,10 +309,18 @@ export function AISettingsContent() {
temperature: getRecommendedTemperature(provider, defaultModel),
});
}}
options={Object.entries(PROVIDER_MODELS).map(([key, meta]) => ({
value: key,
label: meta.label,
}))}
options={[
...Object.entries(PROVIDER_MODELS).map(([key, meta]) => ({
value: key,
label: meta.label,
})),
...(licenseFeaturesForCloud
? [{
value: LUMINA_CLOUD_PROVIDER_ID,
label: LUMINA_CLOUD_PROVIDER.label,
}]
Comment on lines +317 to +321
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Disable unsupported Lumina Cloud provider selection

When cloud_ai is present, this adds a normal selectable option with value: "lumina-cloud", but the rest of the provider pipeline still treats only the existing LLMProviderType set as configurable. If a user picks this row and saves, config.provider becomes an unmapped provider ID (no PROVIDER_MODELS entry and no opencode provider mapping), which leads to an empty/invalid model path and backend provider sync errors being swallowed in useAIStore.setConfig; the UI can report success while chat requests run without the intended provider/model. Since C11 is display-only, this row should be rendered non-selectable (or otherwise prevented from mutating config) until provider wiring exists.

Useful? React with 👍 / 👎.

: []),
]}
/>
)}
</Field>
Expand Down