@glassly/engine 0.4.0-dev.1017 → 0.4.0-dev.1021
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/generated/releaseMetadata.js +3 -3
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/services/LlmRouting.d.ts +1 -1
- package/build/services/LlmRouting.js.map +1 -1
- package/build/services/LocalMiniappRuntime.js +4 -4
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/NavigationHandlers.js +1 -1
- package/build/services/NavigationHandlers.js.map +1 -1
- package/build/services/NavigationService.js +6 -6
- package/build/services/NavigationService.js.map +1 -1
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +8 -0
- package/build/stores/settings.js.map +1 -1
- package/package.json +7 -7
- package/src/generated/releaseMetadata.ts +3 -3
- package/src/services/LlmRouting.ts +1 -1
- package/src/services/LocalMiniappRuntime.ts +4 -4
- package/src/services/NavigationHandlers.ts +1 -1
- package/src/services/NavigationService.ts +6 -6
- package/src/stores/settings.ts +8 -0
|
@@ -477,7 +477,7 @@ function directLlmProvider(name: AiTierProvider): LlmProviderImpl {
|
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
const QUOTA_EXCEEDED_MESSAGE =
|
|
480
|
-
"
|
|
480
|
+
"AI credits are used up. Get more in Settings > Membership, or add your own API key in Settings > API Keys."
|
|
481
481
|
|
|
482
482
|
/** The user's saved key (Settings > API Keys) for an LLM provider, "" if none. */
|
|
483
483
|
function userLlmKey(provider: AiTierProvider): string {
|
|
@@ -4312,8 +4312,8 @@ class LocalMiniappRuntime {
|
|
|
4312
4312
|
this.noteMeteredLlmSuccess()
|
|
4313
4313
|
this.sendResult(packageName, requestId, true, result)
|
|
4314
4314
|
} catch (err) {
|
|
4315
|
-
// 402 quota_exceeded from the runtime: the account's
|
|
4316
|
-
//
|
|
4315
|
+
// 402 quota_exceeded from the runtime: the account's AI credits are
|
|
4316
|
+
// spent. Distinct code (miniapps may fall back to a local path) and
|
|
4317
4317
|
// a host hook so the app can offer the upgrade paywall — the miniapp
|
|
4318
4318
|
// itself must never own that conversation.
|
|
4319
4319
|
const quotaExceeded = err instanceof HttpError && (err.code === "quota_exceeded" || err.status === 402)
|
|
@@ -4490,7 +4490,7 @@ class LocalMiniappRuntime {
|
|
|
4490
4490
|
this.sendResult(packageName, requestId, false, undefined, {
|
|
4491
4491
|
code: MiniappErrorCode.QUOTA_EXCEEDED,
|
|
4492
4492
|
message:
|
|
4493
|
-
"
|
|
4493
|
+
"AI credits are used up. Get more in Settings > Membership, or add your own API key in Settings > API Keys.",
|
|
4494
4494
|
})
|
|
4495
4495
|
return
|
|
4496
4496
|
}
|
|
@@ -150,7 +150,7 @@ export class NavigationHandlers {
|
|
|
150
150
|
const simulate = payload.simulate === true
|
|
151
151
|
const speedNum = Number(payload.speedMultiplier)
|
|
152
152
|
const speedMultiplier = Number.isFinite(speedNum) && speedNum > 0 ? speedNum : 5
|
|
153
|
-
const mode = typeof payload.mode === "string" ? payload.mode : "
|
|
153
|
+
const mode = typeof payload.mode === "string" ? payload.mode : "walking"
|
|
154
154
|
const avoidRaw = payload.avoid as Record<string, unknown> | undefined
|
|
155
155
|
const avoid = avoidRaw
|
|
156
156
|
? {
|
|
@@ -109,7 +109,7 @@ class NavigationService {
|
|
|
109
109
|
private lastManeuver: NavManeuver | null = null
|
|
110
110
|
/** Trip configuration captured at start(), surfaced via getState(). */
|
|
111
111
|
private tripStops: Array<{lat: number; lng: number}> = []
|
|
112
|
-
private tripMode: string = "
|
|
112
|
+
private tripMode: string = "walking"
|
|
113
113
|
|
|
114
114
|
private constructor() {}
|
|
115
115
|
|
|
@@ -229,7 +229,7 @@ class NavigationService {
|
|
|
229
229
|
simulate: options?.simulate ?? false,
|
|
230
230
|
speedMultiplier: options?.speedMultiplier ?? 5,
|
|
231
231
|
stops: options?.stops,
|
|
232
|
-
mode: options?.mode ?? "
|
|
232
|
+
mode: options?.mode ?? "walking",
|
|
233
233
|
avoid: options?.avoid,
|
|
234
234
|
missedTurnRerouteMeters: options?.missedTurnRerouteMeters,
|
|
235
235
|
})
|
|
@@ -237,11 +237,11 @@ class NavigationService {
|
|
|
237
237
|
console.warn(`${LOG_TAG}: start failed — ${result.error}`)
|
|
238
238
|
this.state = "idle"
|
|
239
239
|
this.tripStops = []
|
|
240
|
-
this.tripMode = "
|
|
240
|
+
this.tripMode = "walking"
|
|
241
241
|
} else {
|
|
242
242
|
this.state = "navigating"
|
|
243
243
|
this.tripStops = options?.stops ?? [{lat: coords.lat, lng: coords.lng}]
|
|
244
|
-
this.tripMode = options?.mode ?? "
|
|
244
|
+
this.tripMode = options?.mode ?? "walking"
|
|
245
245
|
}
|
|
246
246
|
return result
|
|
247
247
|
}
|
|
@@ -277,7 +277,7 @@ class NavigationService {
|
|
|
277
277
|
this.lastRoute = null
|
|
278
278
|
this.lastManeuver = null
|
|
279
279
|
this.tripStops = []
|
|
280
|
-
this.tripMode = "
|
|
280
|
+
this.tripMode = "walking"
|
|
281
281
|
return result
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -565,7 +565,7 @@ async function computeRouteViaRoutesApi(payload: Record<string, unknown>): Promi
|
|
|
565
565
|
}> {
|
|
566
566
|
const origin = payload.origin as {lat?: unknown; lng?: unknown} | undefined
|
|
567
567
|
const stopsRaw = payload.stops as Array<{lat?: unknown; lng?: unknown}> | undefined
|
|
568
|
-
const mode = (typeof payload.mode === "string" ? payload.mode : "
|
|
568
|
+
const mode = (typeof payload.mode === "string" ? payload.mode : "walking").toLowerCase()
|
|
569
569
|
const alt = Number(payload.alternatives)
|
|
570
570
|
const alternatives = Number.isFinite(alt) && alt > 0 ? alt : 1
|
|
571
571
|
const avoid = (payload.avoid as Record<string, unknown> | undefined) ?? {}
|
package/src/stores/settings.ts
CHANGED
|
@@ -988,6 +988,13 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
988
988
|
saveOnServer: true,
|
|
989
989
|
persist: true,
|
|
990
990
|
},
|
|
991
|
+
dashboard_size: {
|
|
992
|
+
key: "dashboard_size",
|
|
993
|
+
defaultValue: () => 340,
|
|
994
|
+
writable: true,
|
|
995
|
+
saveOnServer: true,
|
|
996
|
+
persist: true,
|
|
997
|
+
},
|
|
991
998
|
menu_apps: {
|
|
992
999
|
key: "menu_apps",
|
|
993
1000
|
defaultValue: () => null,
|
|
@@ -1259,6 +1266,7 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
1259
1266
|
SETTINGS.auto_brightness.key,
|
|
1260
1267
|
SETTINGS.dashboard_height.key,
|
|
1261
1268
|
SETTINGS.dashboard_depth.key,
|
|
1269
|
+
SETTINGS.dashboard_size.key,
|
|
1262
1270
|
SETTINGS.menu_apps.key,
|
|
1263
1271
|
SETTINGS.calendar_events.key,
|
|
1264
1272
|
SETTINGS.cfw_scene_renderer.key,
|