mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
build: update ng
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
---
|
||||
name: copilotkit-demo-parity
|
||||
description: Keeps examples/integrations/* demos aligned to the north-star (langgraph-python). Use when the user says "sync demos", "sync integrations", "port to north-star", "align integration demos", "parity check", or when working inside examples/integrations/ and tracked files diverge. Drives the pnpm parity:sync / parity:verify commands and handles the manual-merge zones (agent code, api route, Dockerfile).
|
||||
metadata:
|
||||
internal: true
|
||||
---
|
||||
|
||||
# CopilotKit demo parity
|
||||
|
||||
Keeps the three (soon more) integration demos under `examples/integrations/`
|
||||
aligned. `langgraph-python` is north-star; every other entry is an instance
|
||||
that tracks it via `examples/integrations/_parity/manifest.json`.
|
||||
|
||||
## When this skill fires
|
||||
|
||||
- User says "sync demos", "align integrations", "port to north-star",
|
||||
"parity check", "run parity sync".
|
||||
- User edits a file under `examples/integrations/langgraph-python/**` that is
|
||||
listed in `manifest.json` → tracked.verbatimFiles.
|
||||
- User is about to add a new integration under `examples/integrations/`.
|
||||
- `pnpm parity:verify` is failing locally or in CI.
|
||||
|
||||
## Ground truth
|
||||
|
||||
Read these first before making any parity decision — they override
|
||||
anything memorized:
|
||||
|
||||
- `examples/integrations/_parity/manifest.json` — what is tracked, what is
|
||||
allowed to diverge, per-instance overrides.
|
||||
- `examples/integrations/_parity/canonical/PROMPT.md` — the canonical
|
||||
system prompt. Every agent inlines this as a string literal in source.
|
||||
The verifier greps the canonical first line against each agent's source.
|
||||
- `examples/integrations/_parity/README.md` — human-facing how-to.
|
||||
|
||||
## Procedure: sync from north-star to instance(s)
|
||||
|
||||
Use when north-star changed and instances need to catch up, OR when a new
|
||||
instance is being bootstrapped.
|
||||
|
||||
1. **Confirm the north-star change is intentional.** If the user changed
|
||||
a file under `langgraph-python/`, ask whether it should propagate.
|
||||
Changes to `agent/` are never auto-propagated.
|
||||
2. **Dry-run first.**
|
||||
```bash
|
||||
pnpm parity:sync --target=<instance> --dry-run
|
||||
```
|
||||
Read the report: file count, rewritten package.json keys, prompt update.
|
||||
3. **Apply.**
|
||||
```bash
|
||||
pnpm parity:sync --target=<instance>
|
||||
# or --all to sync every instance
|
||||
```
|
||||
4. **Resolve manual-merge zones.** Sync does NOT touch:
|
||||
- `agent/**` — port agent code by hand. See `tracked.agentSurface.toolNames`
|
||||
and `stateKeys` in `manifest.json` for what must be present.
|
||||
- `src/app/api/copilotkit/**` — api route differs across instances
|
||||
(north-star=LangGraphAgent, Docker instances=HttpAgent).
|
||||
- `Dockerfile`, `docker/Dockerfile.agent`, `serve.py`, `scripts/**` —
|
||||
language-specific. Each instance keeps its own.
|
||||
5. **Verify.**
|
||||
```bash
|
||||
pnpm parity:verify --target=<instance>
|
||||
```
|
||||
Exit 0 = green. Exit 1 = unresolved drift; fix until green.
|
||||
|
||||
## Procedure: verify (CI-equivalent)
|
||||
|
||||
```bash
|
||||
pnpm parity:verify # all instances
|
||||
pnpm parity:verify --target=<instance>
|
||||
pnpm parity:verify --json # machine-readable
|
||||
```
|
||||
|
||||
Output kinds:
|
||||
|
||||
- `verbatim-file` — byte-compare against north-star.
|
||||
- `package-json` — tracked key mismatch vs expected value.
|
||||
- `prompt` — canonical prompt first line not found in instance agent
|
||||
source. Instance agent needs the prompt inlined as a string literal.
|
||||
- `agent-tool` — tool name from manifest not found in instance agent
|
||||
source. Usually means a tool was renamed or dropped; update manifest
|
||||
OR port the tool.
|
||||
- `agent-state` — state key from manifest not found (warn only).
|
||||
|
||||
## Procedure: add a new instance
|
||||
|
||||
1. Create the demo dir under `examples/integrations/<name>/` with the
|
||||
usual Next.js frontend root and an `agent/` subdir.
|
||||
2. Add an entry to `manifest.json` → `instances`:
|
||||
```json
|
||||
"<name>": {
|
||||
"role": "instance",
|
||||
"agent": { "language": "...", "runtime": "..." },
|
||||
"allowedDivergence": [
|
||||
"agent/**",
|
||||
"src/app/api/copilotkit/**",
|
||||
"Dockerfile",
|
||||
"docker/Dockerfile.agent",
|
||||
"serve.py",
|
||||
"scripts/**"
|
||||
],
|
||||
"packageJsonOverrides": {
|
||||
"scripts.dev:agent": "<invocation>",
|
||||
"scripts.install:agent": "<install>"
|
||||
}
|
||||
}
|
||||
```
|
||||
3. `pnpm parity:sync --target=<name>`
|
||||
4. Port agent code (tool implementations, state schema, prompt loading).
|
||||
Agent must read prompt from `agent/PROMPT.md` at startup.
|
||||
5. `pnpm parity:verify --target=<name>` until green.
|
||||
|
||||
## Procedure: change the canonical prompt
|
||||
|
||||
1. Edit `examples/integrations/_parity/canonical/PROMPT.md`.
|
||||
2. `pnpm parity:sync --all` — writes the new prompt to every instance's
|
||||
`agent/PROMPT.md`.
|
||||
3. If the prompt change requires new tools or state keys, update
|
||||
`manifest.json` → `tracked.agentSurface` to match, then port each
|
||||
instance's agent.
|
||||
|
||||
## Procedure: change the tracked surface
|
||||
|
||||
To track a new file or key:
|
||||
|
||||
1. Edit `manifest.json` → `tracked.verbatimFiles` or `tracked.packageJsonPaths`.
|
||||
2. Run `pnpm parity:verify` — instances will flag as drifted until synced.
|
||||
3. `pnpm parity:sync --all` to apply.
|
||||
|
||||
To stop tracking something, remove it from `manifest.json`. The verifier
|
||||
and sync stop touching it. Any drift that already exists stays.
|
||||
|
||||
## Red flags
|
||||
|
||||
| Signal | What it means | Do instead |
|
||||
| ----------------------------------------------- | --------------------- | ----------------------------------------------- |
|
||||
| "Just copy the file manually" | Bypasses the manifest | Add to `tracked.verbatimFiles` then sync |
|
||||
| "Add a try/catch so verify doesn't fail" | Silencing drift | Resolve the drift or declare divergence |
|
||||
| "Move this into `allowedDivergence` to unblock" | Scope creep | Only add to divergence with explicit reason |
|
||||
| `pnpm parity:sync` on north-star directly | Overwrites canonical | Sync is instance-only; script refuses |
|
||||
| Agent code copied between languages | Doesn't work | Port by hand; `tracked.agentSurface` names what |
|
||||
|
||||
## Related skills
|
||||
|
||||
- `copilotkit-integrations` — framework-specific wiring (LangGraph, CrewAI,
|
||||
Mastra, etc.) when bootstrapping a new instance.
|
||||
- `copilotkit-dev-workflow` — monorepo conventions, Nx, commit format.
|
||||
- `docker-ci-safety` — Dockerfile safety when editing per-instance
|
||||
container builds.
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
name: git-hooks
|
||||
description: CopilotKit pre-commit hook reference. Load automatically when the user mentions git hooks failing, pre-commit errors, lefthook issues, commit blocked, or "hooks don't work", or when user wants to commit/push anything Contains the full hook topology so debugging skips discovery and goes straight to diagnosis.
|
||||
metadata:
|
||||
internal: true
|
||||
---
|
||||
|
||||
# CopilotKit Git Hooks Reference
|
||||
|
||||
## Hook runner: Lefthook
|
||||
|
||||
The repo uses **lefthook** (not husky). The git hook at `.git/hooks/pre-commit` calls lefthook, which reads `lefthook.yml` at the repo root.
|
||||
|
||||
Config file: `lefthook.yml`
|
||||
|
||||
## Pre-commit commands (run in parallel)
|
||||
|
||||
```
|
||||
sync-lockfile lint-fix test-and-check-packages
|
||||
```
|
||||
|
||||
### 1. `sync-lockfile`
|
||||
|
||||
- **Trigger**: only when `**/package.json` files are staged
|
||||
- **Command**: `pnpm i --lockfile-only`
|
||||
- **`stage_fixed: true`**: auto-stages the updated lockfile
|
||||
- **Fails if**: pnpm can't resolve dependencies
|
||||
|
||||
### 2. `lint-fix`
|
||||
|
||||
- **Command**: `pnpm run lint --fix && pnpm run format`
|
||||
- Expands to: `nx run-many -t lint --projects=packages/**` then `prettier --write "**/*.{ts,tsx,md}"`
|
||||
- **`stage_fixed: true`**: auto-stages any files it fixes
|
||||
- **Fails if**: lint errors that `--fix` can't auto-correct
|
||||
|
||||
### 3. `test-and-check-packages` ← most common failure
|
||||
|
||||
- **Command**: `pnpm run test && pnpm run check:packages`
|
||||
- Expands to:
|
||||
1. `nx run-many -t test` — runs all unit tests across all packages
|
||||
2. `nx run-many -t publint,attw --projects=packages/**` — checks package exports and types are correctly declared
|
||||
- **`stage_fixed: false`** — does NOT auto-stage anything
|
||||
- **Env**: `NX_TUI: "false"` (plain output, no interactive UI)
|
||||
- **Fails if**:
|
||||
- Any test fails
|
||||
- `publint` finds malformed `package.json` exports
|
||||
- `attw` (Are the Types Wrong?) finds type declaration issues
|
||||
|
||||
## Diagnosing a failure
|
||||
|
||||
The summary shows a boxing glove 🥊 for the failing command.
|
||||
The error itself does not show directly.
|
||||
To see the actual error:
|
||||
|
||||
```bash
|
||||
# Run only the failing command manually:
|
||||
pnpm run test # if test-and-check-packages failed
|
||||
pnpm run check:packages # isolate publint/attw from test failures
|
||||
nx run-many -t test --projects=<pkg> # narrow to a specific package
|
||||
|
||||
# Re-run lefthook manually (without committing):
|
||||
pnpm lefthook run pre-commit
|
||||
```
|
||||
|
||||
## npm scripts involved
|
||||
|
||||
| Script | Expands to |
|
||||
| ------------------------- | ---------------------------------------------------- |
|
||||
| `pnpm run lint` | `nx run-many -t lint --projects=packages/**` |
|
||||
| `pnpm run format` | `prettier --write "**/*.{ts,tsx,md}"` |
|
||||
| `pnpm run test` | `nx run-many -t test` |
|
||||
| `pnpm run check:packages` | `nx run-many -t publint,attw --projects=packages/**` |
|
||||
@@ -0,0 +1,9 @@
|
||||
[mcp_servers.copilotkit-docs]
|
||||
url = "https://mcp.copilotkit.ai/mcp"
|
||||
|
||||
[mcp_servers.nx-mcp]
|
||||
command = "npx"
|
||||
args = [
|
||||
"nx",
|
||||
"mcp",
|
||||
]
|
||||
@@ -8,7 +8,7 @@
|
||||
"sourceRoot": "src",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:application",
|
||||
"builder": "@angular/build:application",
|
||||
"options": {
|
||||
"outputPath": "dist/angular-demo",
|
||||
"index": "src/index.html",
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"builder": "@angular/build:dev-server",
|
||||
"options": {
|
||||
"buildTarget": "angular-demo:build"
|
||||
}
|
||||
@@ -30,5 +30,31 @@
|
||||
},
|
||||
"cli": {
|
||||
"analytics": "980356bd-241e-4f9c-91f9-6c7714a97a43"
|
||||
},
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"type": "component"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"type": "directive"
|
||||
},
|
||||
"@schematics/angular:service": {
|
||||
"type": "service"
|
||||
},
|
||||
"@schematics/angular:guard": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:interceptor": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:module": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:pipe": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:resolver": {
|
||||
"typeSeparator": "."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
"@ag-ui/core": "0.0.51",
|
||||
"@ag-ui/encoder": "0.0.51",
|
||||
"@ag-ui/proto": "0.0.51",
|
||||
"@angular/animations": "^19.0.0",
|
||||
"@angular/cdk": "^19.0.0",
|
||||
"@angular/common": "^19.0.0",
|
||||
"@angular/compiler": "^19.0.0",
|
||||
"@angular/core": "^19.0.0",
|
||||
"@angular/forms": "^19.0.0",
|
||||
"@angular/platform-browser": "^19.0.0",
|
||||
"@angular/platform-browser-dynamic": "^19.0.0",
|
||||
"@angular/animations": "^21.2.15",
|
||||
"@angular/cdk": "^21.2.13",
|
||||
"@angular/common": "^21.2.15",
|
||||
"@angular/compiler": "^21.2.15",
|
||||
"@angular/core": "^21.2.15",
|
||||
"@angular/forms": "^21.2.15",
|
||||
"@angular/platform-browser": "^21.2.15",
|
||||
"@angular/platform-browser-dynamic": "^21.2.15",
|
||||
"@copilotkit/angular": "link:../../../../packages/angular",
|
||||
"@copilotkit/web-inspector": "workspace:*",
|
||||
"@copilotkitnext/angular": "workspace:*",
|
||||
@@ -36,15 +36,14 @@
|
||||
"untruncate-json": "^0.0.1",
|
||||
"uuid": "^11.1.0",
|
||||
"zod": "^3.25.75",
|
||||
"zod-to-json-schema": "^3.24.6",
|
||||
"zone.js": "^0.14.0"
|
||||
"zod-to-json-schema": "^3.24.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^19.0.0",
|
||||
"@angular/cli": "^19.0.0",
|
||||
"@angular/compiler-cli": "^19.0.0",
|
||||
"@angular/build": "^21.2.13",
|
||||
"@angular/cli": "^21.2.13",
|
||||
"@angular/compiler-cli": "^21.2.15",
|
||||
"nodemon": "^3.1.7",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "5.8.2"
|
||||
"typescript": "5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
|
||||
import { HeadlessChatComponent } from "./routes/headless/headless-chat.component";
|
||||
import { CustomInputChatComponent } from "./routes/custom-input/custom-input-chat.component";
|
||||
import { DefaultChatComponent } from "./routes/default/default-chat.component";
|
||||
@@ -9,7 +9,6 @@ import { CoPilotPortComponent } from "./routes/ukg-port/co-pilot-port.component"
|
||||
selector: "app-root",
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
HeadlessChatComponent,
|
||||
CustomInputChatComponent,
|
||||
DefaultChatComponent,
|
||||
@@ -26,18 +25,18 @@ import { CoPilotPortComponent } from "./routes/ukg-port/co-pilot-port.component"
|
||||
display: block;
|
||||
"
|
||||
>
|
||||
<ng-container *ngIf="isHeadless">
|
||||
<headless-chat></headless-chat>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isCustomInput">
|
||||
<nextgen-custom-input-chat></nextgen-custom-input-chat>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!isHeadless && !isCustomInput && !isUkgPort">
|
||||
<default-chat></default-chat>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isUkgPort">
|
||||
<ukg-co-pilot-port></ukg-co-pilot-port>
|
||||
</ng-container>
|
||||
@if (isHeadless) {
|
||||
<headless-chat />
|
||||
}
|
||||
@if (isCustomInput) {
|
||||
<nextgen-custom-input-chat />
|
||||
}
|
||||
@if (!isHeadless && !isCustomInput && !isUkgPort) {
|
||||
<default-chat />
|
||||
}
|
||||
@if (isUkgPort) {
|
||||
<ukg-co-pilot-port />
|
||||
}
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Component, input, Input } from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { AngularToolCall, ToolRenderer } from "@copilotkit/angular";
|
||||
|
||||
import type { AngularToolCall, ToolRenderer } from "@copilotkit/angular";
|
||||
|
||||
@Component({
|
||||
selector: "wildcard-tool-render",
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
imports: [],
|
||||
template: `
|
||||
<div
|
||||
style="
|
||||
|
||||
+10
-10
@@ -1,29 +1,29 @@
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Input,
|
||||
inject,
|
||||
input,
|
||||
} from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
|
||||
import { FormsModule } from "@angular/forms";
|
||||
import { injectChatState } from "@copilotkit/angular";
|
||||
|
||||
@Component({
|
||||
selector: "nextgen-custom-input",
|
||||
standalone: true,
|
||||
imports: [CommonModule, FormsModule],
|
||||
imports: [FormsModule],
|
||||
template: `
|
||||
<form
|
||||
class="ck-input-wrapper"
|
||||
(ngSubmit)="submit()"
|
||||
[class.ck-disabled]="inProgress"
|
||||
[class.ck-disabled]="inProgress()"
|
||||
novalidate
|
||||
autocomplete="off"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="ck-icon"
|
||||
[disabled]="inProgress"
|
||||
[disabled]="inProgress()"
|
||||
title="Add attachment"
|
||||
>
|
||||
+
|
||||
@@ -37,7 +37,7 @@ import { injectChatState } from "@copilotkit/angular";
|
||||
type="text"
|
||||
[(ngModel)]="value"
|
||||
(ngModelChange)="chatState.changeInput($event)"
|
||||
[disabled]="inProgress"
|
||||
[disabled]="inProgress()"
|
||||
placeholder="Ask anything…"
|
||||
autocapitalize="sentences"
|
||||
autocomplete="off"
|
||||
@@ -51,7 +51,7 @@ import { injectChatState } from "@copilotkit/angular";
|
||||
<button
|
||||
type="submit"
|
||||
class="ck-send"
|
||||
[disabled]="inProgress || !canSend"
|
||||
[disabled]="inProgress() || !canSend"
|
||||
[attr.aria-label]="'Send message'"
|
||||
>
|
||||
↑
|
||||
@@ -125,8 +125,8 @@ import { injectChatState } from "@copilotkit/angular";
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class CustomChatInputComponent {
|
||||
@Input() inProgress = false;
|
||||
@Input() inputClass?: string;
|
||||
readonly inProgress = input(false);
|
||||
readonly inputClass = input<string>();
|
||||
|
||||
value = "";
|
||||
composing = false;
|
||||
@@ -141,7 +141,7 @@ export class CustomChatInputComponent {
|
||||
}
|
||||
|
||||
async submit(): Promise<void> {
|
||||
if (this.inProgress) return;
|
||||
if (this.inProgress()) return;
|
||||
if (!this.canSend) return;
|
||||
this.chatState.submitInput(this.valueTrimmed);
|
||||
this.value = "";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component } from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
|
||||
import {
|
||||
CopilotChatView,
|
||||
CopilotChat,
|
||||
@@ -10,10 +10,10 @@ import { CustomChatInputComponent } from "./custom-chat-input.component";
|
||||
@Component({
|
||||
selector: "nextgen-custom-input-chat",
|
||||
standalone: true,
|
||||
imports: [CommonModule, CopilotChat],
|
||||
imports: [CopilotChat],
|
||||
template: `
|
||||
<div style="display: block; height: 100vh">
|
||||
<copilot-chat [inputComponent]="customInput"></copilot-chat>
|
||||
<copilot-chat [inputComponent]="customInput" />
|
||||
</div>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
|
||||
import { CopilotChat } from "@copilotkit/angular";
|
||||
|
||||
@Component({
|
||||
selector: "default-chat",
|
||||
standalone: true,
|
||||
imports: [CommonModule, CopilotChat],
|
||||
imports: [CopilotChat],
|
||||
template: `
|
||||
<copilot-chat [threadId]="'xyz'"></copilot-chat>
|
||||
<copilot-chat [threadId]="'xyz'" />
|
||||
`,
|
||||
})
|
||||
export class DefaultChatComponent {}
|
||||
|
||||
@@ -7,7 +7,8 @@ import {
|
||||
input,
|
||||
signal,
|
||||
} from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
|
||||
import { TitleCasePipe } from "@angular/common";
|
||||
import { FormsModule } from "@angular/forms";
|
||||
import type {
|
||||
HumanInTheLoopToolCall,
|
||||
@@ -27,7 +28,7 @@ import { z } from "zod";
|
||||
@Component({
|
||||
selector: "require-approval",
|
||||
standalone: true,
|
||||
imports: [CommonModule, FormsModule],
|
||||
imports: [FormsModule],
|
||||
template: `
|
||||
<div>Require approval</div>
|
||||
<button (click)="respond({ approved: true })">Approve</button>
|
||||
@@ -48,7 +49,7 @@ export class RequireApprovalComponent implements HumanInTheLoopToolRenderer {
|
||||
@Component({
|
||||
selector: "headless-chat",
|
||||
standalone: true,
|
||||
imports: [CommonModule, FormsModule, RenderToolCalls],
|
||||
imports: [FormsModule, RenderToolCalls, TitleCasePipe],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<div
|
||||
@@ -65,22 +66,24 @@ export class RequireApprovalComponent implements HumanInTheLoopToolRenderer {
|
||||
color: #111827;
|
||||
"
|
||||
>
|
||||
<div *ngFor="let m of messages()" style="margin-bottom: 16px">
|
||||
<div style="font-weight: 600; color: #374151">
|
||||
{{ m.role | titlecase }}
|
||||
@for (m of messages(); track m) {
|
||||
<div style="margin-bottom: 16px">
|
||||
<div style="font-weight: 600; color: #374151">
|
||||
{{ m.role | titlecase }}
|
||||
</div>
|
||||
<div style="white-space: pre-wrap">{{ m.content }}</div>
|
||||
@if (m.role === "assistant") {
|
||||
<copilot-render-tool-calls
|
||||
[message]="m"
|
||||
[messages]="messages() ?? []"
|
||||
[isLoading]="isRunning()"
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
<div style="white-space: pre-wrap">{{ m.content }}</div>
|
||||
<ng-container *ngIf="m.role === 'assistant'">
|
||||
<copilot-render-tool-calls
|
||||
[message]="m"
|
||||
[messages]="messages() ?? []"
|
||||
[isLoading]="isRunning()"
|
||||
></copilot-render-tool-calls>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div *ngIf="isRunning()" style="opacity: 0.9; color: #6b7280">
|
||||
Thinking…
|
||||
</div>
|
||||
}
|
||||
@if (isRunning()) {
|
||||
<div style="opacity: 0.9; color: #6b7280">Thinking…</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<form
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CustomChatInputComponent } from "../custom-input/custom-chat-input.comp
|
||||
imports: [CopilotChatView],
|
||||
template: `
|
||||
<div style="display: block; height: 100vh">
|
||||
<copilot-chat-view [inputComponent]="customInput"></copilot-chat-view>
|
||||
<copilot-chat-view [inputComponent]="customInput" />
|
||||
</div>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import "zone.js";
|
||||
import { provideZonelessChangeDetection } from "@angular/core";
|
||||
import { bootstrapApplication } from "@angular/platform-browser";
|
||||
import { AppComponent } from "./app/app.component";
|
||||
import { appConfig } from "./app/app.config";
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||
console.error(err),
|
||||
);
|
||||
bootstrapApplication(AppComponent, {
|
||||
...appConfig,
|
||||
providers: [provideZonelessChangeDetection(), ...appConfig.providers],
|
||||
}).catch((err) => console.error(err));
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": false,
|
||||
"esModuleInterop": true,
|
||||
"module": "ES2020",
|
||||
"moduleResolution": "Node",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
"@copilotkit/core": "workspace:^",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1",
|
||||
"zod": "^3.25.75",
|
||||
"zone.js": "^0.14.0"
|
||||
"zod": "^3.25.75"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^19.0.0",
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
@@ -11,7 +15,7 @@
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
@@ -19,9 +23,20 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules", "mcp-apps"]
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"mcp-apps"
|
||||
]
|
||||
}
|
||||
|
||||
+8
-1
@@ -88,7 +88,14 @@ pre-commit:
|
||||
tags: test-packages
|
||||
env:
|
||||
NX_TUI: "false"
|
||||
run: pnpm run test && pnpm run check:packages
|
||||
run: |
|
||||
set -- {staged_files}
|
||||
if [ "$#" -gt 0 ]; then
|
||||
projects=$(printf '%s\n' "$@" | pnpm nx show projects --affected --projects 'packages/*' --stdin --sep=,)
|
||||
if [ -n "$projects" ]; then
|
||||
pnpm nx run-many -t test,publint,attw --projects="$projects" --outputStyle=static
|
||||
fi
|
||||
fi
|
||||
|
||||
check-plugin-skills:
|
||||
tags: plugin-skills
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"migrations": [
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "22.6.0-beta.10",
|
||||
"description": "Adds .claude/worktrees to .gitignore",
|
||||
"implementation": "./dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore",
|
||||
"package": "nx",
|
||||
"name": "22-6-1-add-claude-worktrees-to-git-ignore"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "22.7.0-beta.0",
|
||||
"description": "Adds .nx/polygraph to .gitignore",
|
||||
"implementation": "./dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore",
|
||||
"package": "nx",
|
||||
"name": "22-7-0-add-polygraph-to-git-ignore"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "22.6.0-rc.0",
|
||||
"description": "Adds .claude/settings.local.json to .gitignore",
|
||||
"implementation": "./dist/src/migrations/update-17-3-0/update-nxw",
|
||||
"package": "nx",
|
||||
"name": "22-6-0-add-claude-settings-local-to-git-ignore"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "22.7.0-beta.0",
|
||||
"description": "Adds .nx/self-healing to .gitignore",
|
||||
"implementation": "./dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore",
|
||||
"package": "nx",
|
||||
"name": "22-7-0-add-self-healing-to-gitignore"
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
"jscodeshift": "^17.3.0",
|
||||
"lefthook": "^2.1.1",
|
||||
"npm": "^10.7.0",
|
||||
"nx": "^22.5.0",
|
||||
"nx": "22.7.5",
|
||||
"oxfmt": "^0.36.0",
|
||||
"oxlint": "^1.51.0",
|
||||
"publint": "^0.3.17",
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
"type": "module",
|
||||
"main": "dist/fesm2022/copilotkitnext-angular.mjs",
|
||||
"module": "dist/fesm2022/copilotkitnext-angular.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"types": "dist/types/copilotkitnext-angular.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/types/copilotkitnext-angular.d.ts",
|
||||
"import": "./dist/fesm2022/copilotkitnext-angular.mjs"
|
||||
},
|
||||
"./styles.css": "./dist/styles.css"
|
||||
@@ -49,13 +50,13 @@
|
||||
"devDependencies": {
|
||||
"@analogjs/vite-plugin-angular": "^1.20.2",
|
||||
"@analogjs/vitest-angular": "^1.20.2",
|
||||
"@angular/cdk": "^19.0.0",
|
||||
"@angular/common": "^19.0.0",
|
||||
"@angular/compiler": "^19.0.0",
|
||||
"@angular/compiler-cli": "^19.0.0",
|
||||
"@angular/core": "^19.0.0",
|
||||
"@angular/platform-browser": "^19.0.0",
|
||||
"@angular/platform-browser-dynamic": "^19.0.0",
|
||||
"@angular/cdk": "^21.2.13",
|
||||
"@angular/common": "^21.2.15",
|
||||
"@angular/compiler": "^21.2.15",
|
||||
"@angular/compiler-cli": "^21.2.15",
|
||||
"@angular/core": "^21.2.15",
|
||||
"@angular/platform-browser": "^21.2.15",
|
||||
"@angular/platform-browser-dynamic": "^21.2.15",
|
||||
"@copilotkit/typescript-config": "workspace:*",
|
||||
"@lucide/build-icons": "^1.1.0",
|
||||
"@tailwindcss/cli": "^4.1.11",
|
||||
@@ -67,7 +68,7 @@
|
||||
"autoprefixer": "^10.4.16",
|
||||
"concurrently": "^9.1.0",
|
||||
"jsdom": "^24.0.0",
|
||||
"ng-packagr": "^19.0.0",
|
||||
"ng-packagr": "^21.2.3",
|
||||
"postcss": "^8.4.31",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rimraf": "^6.0.1",
|
||||
@@ -75,11 +76,10 @@
|
||||
"tailwindcss": "^4.0.8",
|
||||
"tslib": "^2.8.1",
|
||||
"tw-animate-css": "^1.3.5",
|
||||
"typescript": "5.8.2",
|
||||
"typescript": "5.9.3",
|
||||
"vite": "^7.1.4",
|
||||
"vitest": "^3.2.4",
|
||||
"zod": "^3.22.4",
|
||||
"zone.js": "^0.14.0"
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/cdk": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
||||
|
||||
Generated
+7164
-2952
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user