@m6d/cortex-angular 0.1.0 → 0.1.1

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.
@@ -8426,6 +8426,13 @@ var MessageBodyComponent = class MessageBodyComponent2 {
8426
8426
  return;
8427
8427
  return lastTextIndex < parts.length - 1 ? lastTextIndex : -1;
8428
8428
  }, ...ngDevMode ? [{ debugName: "actionsAfterPart" }] : []);
8429
+ keyedParts = computed(() => {
8430
+ const source = this.message().parts;
8431
+ return this.parts().map((part) => ({
8432
+ part,
8433
+ key: source.indexOf(part)
8434
+ }));
8435
+ }, ...ngDevMode ? [{ debugName: "keyedParts" }] : []);
8429
8436
  sentAgo = computed(() => {
8430
8437
  const at = this.createdAt();
8431
8438
  return at ? relativeTimeLabel(at, this.locale(), this.revealedAt()) : "";
@@ -8444,9 +8451,6 @@ var MessageBodyComponent = class MessageBodyComponent2 {
8444
8451
  key
8445
8452
  };
8446
8453
  }
8447
- partKey(part) {
8448
- return this.message().parts.indexOf(part);
8449
- }
8450
8454
  tokenUsage = computed(() => this.metadata()?.tokenUsage, ...ngDevMode ? [{ debugName: "tokenUsage" }] : []);
8451
8455
  showsDebugZone = computed(() => this.debugMode() && Boolean(this.metadata()) && (Boolean(this.tokenUsage()) || this.isAssistant()), ...ngDevMode ? [{ debugName: "showsDebugZone" }] : []);
8452
8456
  static ɵfac = i0.ɵɵngDeclareFactory({
@@ -8523,7 +8527,8 @@ var MessageBodyComponent = class MessageBodyComponent2 {
8523
8527
  classAttribute: "cortex-message-parts"
8524
8528
  },
8525
8529
  ngImport: i0,
8526
- template: `@for (part of parts(); track partKey(part)) {
8530
+ template: `@for (drawn of keyedParts(); track drawn.key) {
8531
+ @let part = drawn.part;
8527
8532
  <cortex-message-part
8528
8533
  [part]="part"
8529
8534
  [message]="message()"
@@ -8671,7 +8676,8 @@ i0.ɵɵngDeclareClassMetadata({
8671
8676
  "(mouseenter)": "reveal()",
8672
8677
  "(focusin)": "reveal()"
8673
8678
  },
8674
- template: `@for (part of parts(); track partKey(part)) {
8679
+ template: `@for (drawn of keyedParts(); track drawn.key) {
8680
+ @let part = drawn.part;
8675
8681
  <cortex-message-part
8676
8682
  [part]="part"
8677
8683
  [message]="message()"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m6d/cortex-angular",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Reusable AI agent chat UI library for Angular",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,