@threadplane/chat 0.0.54 → 0.0.55
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/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Part of [Threadplane](https://github.com/cacheplane/angular-agent-framework).
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npm install @threadplane/chat
|
|
31
|
+
npm install @threadplane/chat @threadplane/langgraph marked
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
**Peer dependencies:**
|
|
@@ -37,6 +37,7 @@ npm install @threadplane/chat
|
|
|
37
37
|
@angular/core ^20.0.0 || ^21.0.0
|
|
38
38
|
@angular/common ^20.0.0 || ^21.0.0
|
|
39
39
|
@angular/platform-browser ^20.0.0 || ^21.0.0
|
|
40
|
+
@angular/router ^20.0.0 || ^21.0.0
|
|
40
41
|
@threadplane/licensing *
|
|
41
42
|
@threadplane/render *
|
|
42
43
|
@threadplane/a2ui *
|
|
@@ -44,6 +45,8 @@ npm install @threadplane/chat
|
|
|
44
45
|
@langchain/core ^1.1.33
|
|
45
46
|
rxjs ~7.8.0
|
|
46
47
|
marked ^15.0.0 || ^16.0.0
|
|
48
|
+
zod ^3.25.0
|
|
49
|
+
katex ^0.16.0 || ^0.17.0 (optional)
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
---
|
|
@@ -54,9 +57,13 @@ marked ^15.0.0 || ^16.0.0
|
|
|
54
57
|
// app.config.ts
|
|
55
58
|
import { ApplicationConfig } from '@angular/core';
|
|
56
59
|
import { provideChat } from '@threadplane/chat';
|
|
60
|
+
import { provideAgent } from '@threadplane/langgraph';
|
|
57
61
|
|
|
58
62
|
export const appConfig: ApplicationConfig = {
|
|
59
|
-
providers: [
|
|
63
|
+
providers: [
|
|
64
|
+
provideAgent({ apiUrl: '/api/langgraph', assistantId: 'agent' }),
|
|
65
|
+
provideChat({ license: 'eyJ…' }),
|
|
66
|
+
],
|
|
60
67
|
};
|
|
61
68
|
```
|
|
62
69
|
|
|
@@ -64,7 +71,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
64
71
|
// my.component.ts
|
|
65
72
|
import { Component } from '@angular/core';
|
|
66
73
|
import { ChatComponent } from '@threadplane/chat';
|
|
67
|
-
import {
|
|
74
|
+
import { injectAgent } from '@threadplane/langgraph';
|
|
68
75
|
|
|
69
76
|
@Component({
|
|
70
77
|
selector: 'app-root',
|
|
@@ -72,11 +79,11 @@ import { agent } from '@threadplane/langgraph';
|
|
|
72
79
|
template: `<chat [agent]="myAgent" />`,
|
|
73
80
|
})
|
|
74
81
|
export class AppComponent {
|
|
75
|
-
myAgent =
|
|
82
|
+
protected readonly myAgent = injectAgent();
|
|
76
83
|
}
|
|
77
84
|
```
|
|
78
85
|
|
|
79
|
-
Get the
|
|
86
|
+
Get the agent from `@threadplane/langgraph` (for LangGraph Platform backends) or `@threadplane/ag-ui` (for AG-UI-compatible backends). See those packages for setup details.
|
|
80
87
|
|
|
81
88
|
---
|
|
82
89
|
|
|
@@ -2477,8 +2477,15 @@ const IS_HEADER_ROW = new InjectionToken('IS_HEADER_ROW', {
|
|
|
2477
2477
|
// SPDX-License-Identifier: MIT
|
|
2478
2478
|
class MarkdownTableRowComponent {
|
|
2479
2479
|
node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
2480
|
+
registry = inject(MARKDOWN_VIEW_REGISTRY);
|
|
2481
|
+
resolve(child) {
|
|
2482
|
+
const entry = this.registry[child.type];
|
|
2483
|
+
if (!entry)
|
|
2484
|
+
return null;
|
|
2485
|
+
return typeof entry === 'function' ? entry : entry.component;
|
|
2486
|
+
}
|
|
2480
2487
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: MarkdownTableRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2481
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2488
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: MarkdownTableRowComponent, isStandalone: true, selector: "chat-md-table-row", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
2482
2489
|
{
|
|
2483
2490
|
provide: IS_HEADER_ROW,
|
|
2484
2491
|
useFactory: () => {
|
|
@@ -2488,20 +2495,30 @@ class MarkdownTableRowComponent {
|
|
|
2488
2495
|
},
|
|
2489
2496
|
], ngImport: i0, template: `
|
|
2490
2497
|
<tr class="chat-md-table-row" [class.chat-md-table-row--header]="node().isHeader">
|
|
2491
|
-
|
|
2498
|
+
@for (child of node().children; track $index) {
|
|
2499
|
+
@let comp = resolve(child);
|
|
2500
|
+
@if (comp) {
|
|
2501
|
+
<ng-container *ngComponentOutlet="comp; inputs: { node: child }" />
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2492
2504
|
</tr>
|
|
2493
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
2505
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2494
2506
|
}
|
|
2495
2507
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: MarkdownTableRowComponent, decorators: [{
|
|
2496
2508
|
type: Component,
|
|
2497
2509
|
args: [{
|
|
2498
2510
|
selector: 'chat-md-table-row',
|
|
2499
2511
|
standalone: true,
|
|
2500
|
-
imports: [
|
|
2512
|
+
imports: [NgComponentOutlet],
|
|
2501
2513
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2502
2514
|
template: `
|
|
2503
2515
|
<tr class="chat-md-table-row" [class.chat-md-table-row--header]="node().isHeader">
|
|
2504
|
-
|
|
2516
|
+
@for (child of node().children; track $index) {
|
|
2517
|
+
@let comp = resolve(child);
|
|
2518
|
+
@if (comp) {
|
|
2519
|
+
<ng-container *ngComponentOutlet="comp; inputs: { node: child }" />
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2505
2522
|
</tr>
|
|
2506
2523
|
`,
|
|
2507
2524
|
providers: [
|