@praxisui/ai 10.0.0-rc.49 → 10.0.0-rc.50

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-11-17T22:43:07.679Z",
3
+ "generatedAt": "2026-11-18T01:27:35.895Z",
4
4
  "packageName": "@praxisui/ai",
5
- "packageVersion": "10.0.0-rc.49",
5
+ "packageVersion": "10.0.0-rc.50",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 0,
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Injectable, InjectionToken, Optional, Inject, inject, signal, computed, ChangeDetectorRef, ElementRef, ViewChild, Input, ChangeDetectionStrategy, input, output, EventEmitter, Injector, HostListener, Output, booleanAttribute, DestroyRef, effect } from '@angular/core';
2
+ import { Component, Injectable, InjectionToken, Optional, Inject, inject, signal, computed, ChangeDetectorRef, ElementRef, ViewChild, Input, ChangeDetectionStrategy, input, output, EventEmitter, Injector, HostListener, Output, booleanAttribute, DestroyRef, untracked, effect } from '@angular/core';
3
3
  import { SchemaType, GoogleGenerativeAI } from '@google/generative-ai';
4
4
  import { throwError, from, Observable, of, skip, Subscription, take as take$1, defer, switchMap, Subject, tap, map as map$1, finalize, share, filter as filter$1, concat, merge, catchError as catchError$1, EMPTY, timer, takeUntil, timeout, BehaviorSubject, isObservable, firstValueFrom } from 'rxjs';
5
5
  import { map, catchError, filter, take } from 'rxjs/operators';
@@ -14154,6 +14154,7 @@ class WorkspaceAssistantOrchestratorService {
14154
14154
  blockDispatchSubject = new Subject();
14155
14155
  activeTurnSubscription = null;
14156
14156
  activeStreamId = null;
14157
+ fallbackRouterAdapter = null;
14157
14158
  lastUserPrompt = '';
14158
14159
  messageCounter = 0;
14159
14160
  open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
@@ -14315,17 +14316,45 @@ class WorkspaceAssistantOrchestratorService {
14315
14316
  });
14316
14317
  }
14317
14318
  configureOptions(options) {
14318
- const merged = {
14319
- ...this.optionsSignal(),
14320
- ...options,
14321
- };
14322
- this.optionsSignal.set(merged);
14323
- if (options.defaultQuickReplies && this.messages().length === 0) {
14324
- this.quickReplies.set([...options.defaultQuickReplies]);
14325
- }
14326
- if (options.recommendedIntents) {
14327
- this.recommendedIntents.set([...options.recommendedIntents]);
14328
- }
14319
+ untracked(() => {
14320
+ const merged = {
14321
+ ...this.optionsSignal(),
14322
+ ...options,
14323
+ };
14324
+ this.optionsSignal.set(merged);
14325
+ if (options.defaultQuickReplies && this.messages().length === 0) {
14326
+ this.quickReplies.set([...options.defaultQuickReplies]);
14327
+ }
14328
+ if (options.recommendedIntents) {
14329
+ this.recommendedIntents.set([...options.recommendedIntents]);
14330
+ }
14331
+ });
14332
+ }
14333
+ configureDefaultOptions(defaults) {
14334
+ untracked(() => {
14335
+ const current = this.optionsSignal();
14336
+ const merged = {
14337
+ ...defaults,
14338
+ ...current,
14339
+ };
14340
+ this.optionsSignal.set(merged);
14341
+ if (!current.defaultQuickReplies &&
14342
+ defaults.defaultQuickReplies &&
14343
+ this.messages().length === 0) {
14344
+ this.quickReplies.set([...defaults.defaultQuickReplies]);
14345
+ }
14346
+ if (!current.recommendedIntents &&
14347
+ defaults.recommendedIntents &&
14348
+ this.recommendedIntents().length === 0) {
14349
+ this.recommendedIntents.set([...defaults.recommendedIntents]);
14350
+ }
14351
+ });
14352
+ }
14353
+ getOptions() {
14354
+ return untracked(() => this.optionsSignal());
14355
+ }
14356
+ registerFallbackRouter(adapter) {
14357
+ this.fallbackRouterAdapter = adapter;
14329
14358
  }
14330
14359
  setRouteContext(context) {
14331
14360
  this.routeContextSignal.set(context);
@@ -14701,10 +14730,11 @@ class WorkspaceAssistantOrchestratorService {
14701
14730
  route: safeRoute,
14702
14731
  sourceEvent,
14703
14732
  });
14704
- if (handledByHook === false || !this.routerAdapter) {
14733
+ const router = this.routerAdapter ?? this.fallbackRouterAdapter;
14734
+ if (handledByHook === false || !router) {
14705
14735
  return;
14706
14736
  }
14707
- await this.routerAdapter.navigateByUrl(safeRoute);
14737
+ await router.navigateByUrl(safeRoute);
14708
14738
  }
14709
14739
  dispatchOpenSurface(request) {
14710
14740
  void this.optionsSignal().onOpenSurface?.(request);
@@ -14897,9 +14927,10 @@ class WorkspaceAssistantOrchestratorService {
14897
14927
  }
14898
14928
  resolveCurrentRouteContext() {
14899
14929
  const explicit = this.routeContextSignal();
14930
+ const router = this.routerAdapter ?? this.fallbackRouterAdapter;
14900
14931
  const url = this.optionsSignal().getCurrentUrl?.() ??
14901
- this.routerAdapter?.getUrl?.() ??
14902
- this.routerAdapter?.url ??
14932
+ router?.getUrl?.() ??
14933
+ router?.url ??
14903
14934
  this.location?.path?.() ??
14904
14935
  '';
14905
14936
  const resolved = url ? this.optionsSignal().resolveRouteContext?.(url) ?? null : null;
@@ -15026,20 +15057,26 @@ class PraxisWorkspaceAssistantComponent {
15026
15057
  effect(() => {
15027
15058
  const opts = this.assistantOptions();
15028
15059
  if (opts) {
15029
- this.orchestrator.configureOptions(opts);
15060
+ untracked(() => {
15061
+ this.orchestrator.configureOptions(opts);
15062
+ });
15030
15063
  }
15031
15064
  });
15032
15065
  effect(() => {
15033
15066
  const routeCtx = this.routeContext();
15034
15067
  if (routeCtx !== undefined) {
15035
- this.orchestrator.setRouteContext(routeCtx);
15068
+ untracked(() => {
15069
+ this.orchestrator.setRouteContext(routeCtx);
15070
+ });
15036
15071
  }
15037
15072
  });
15038
15073
  effect(() => {
15039
15074
  const compId = this.componentId();
15040
15075
  const compType = this.componentType();
15041
15076
  if (compId) {
15042
- void this.orchestrator.refreshGrounding(compId, compType);
15077
+ untracked(() => {
15078
+ void this.orchestrator.refreshGrounding(compId, compType);
15079
+ });
15043
15080
  }
15044
15081
  });
15045
15082
  this.orchestrator.blockActionDispatched$
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@praxisui/ai",
3
- "version": "10.0.0-rc.49",
3
+ "version": "10.0.0-rc.50",
4
4
  "description": "AI building blocks and assistant integration for Praxis UI applications.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
- "@praxisui/core": "^10.0.0-rc.49",
8
+ "@praxisui/core": "^10.0.0-rc.50",
9
9
  "@angular/cdk": "^21.0.0",
10
10
  "@angular/forms": "^21.0.0",
11
11
  "@angular/material": "^21.0.0",
@@ -3567,6 +3567,7 @@ declare class WorkspaceAssistantOrchestratorService {
3567
3567
  private readonly blockDispatchSubject;
3568
3568
  private activeTurnSubscription;
3569
3569
  private activeStreamId;
3570
+ private fallbackRouterAdapter;
3570
3571
  private lastUserPrompt;
3571
3572
  private messageCounter;
3572
3573
  readonly open: _angular_core.WritableSignal<boolean>;
@@ -3594,6 +3595,9 @@ declare class WorkspaceAssistantOrchestratorService {
3594
3595
  readonly contextItems: _angular_core.Signal<readonly PraxisAssistantShellContextItem[]>;
3595
3596
  constructor();
3596
3597
  configureOptions(options: Partial<PraxisWorkspaceAssistantOptions>): void;
3598
+ configureDefaultOptions(defaults: Partial<PraxisWorkspaceAssistantOptions>): void;
3599
+ getOptions(): Readonly<PraxisWorkspaceAssistantOptions>;
3600
+ registerFallbackRouter(adapter: WorkspaceAssistantRouterAdapter): void;
3597
3601
  setRouteContext(context: WorkspaceAssistantRouteContext | null): void;
3598
3602
  openPanel(): void;
3599
3603
  closePanel(): void;