@newheap/platform-ai-chat 0.9.0 → 0.11.0
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/admin/index.d.ts +117 -9
- package/agent-runs/index.d.ts +52 -8
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +337 -33
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs +154 -28
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +233 -15
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +446 -33
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +175 -11
- package/i18n/nl.json +175 -11
- package/index.d.ts +357 -15
- package/package.json +1 -1
- package/testing/index.d.ts +7 -0
|
@@ -48,6 +48,8 @@ const NhAssistantClientErrorCodes = {
|
|
|
48
48
|
conversationRemoved: 'assistant-conversation-removed'
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
/** The most proposals one `POST approvals/lookup` reads. */
|
|
52
|
+
const NH_ASSISTANT_MAX_PROPOSAL_LOOKUP = 100;
|
|
51
53
|
/** Maximum number of subjects one `POST subjects/{type}/summary` request accepts. */
|
|
52
54
|
const NH_ASSISTANT_MAX_SUBJECT_SUMMARY = 200;
|
|
53
55
|
/** The feedback categories in the order people choose them. */
|
|
@@ -164,7 +166,8 @@ var en = {
|
|
|
164
166
|
loading: "Loading conversation",
|
|
165
167
|
elapsed: "{{seconds}}s",
|
|
166
168
|
participant: "Participant",
|
|
167
|
-
trigger: "Event"
|
|
169
|
+
trigger: "Event",
|
|
170
|
+
rule: "Automatic rule"
|
|
168
171
|
},
|
|
169
172
|
composer: {
|
|
170
173
|
label: "Message",
|
|
@@ -217,10 +220,12 @@ var en = {
|
|
|
217
220
|
"grant-source": {
|
|
218
221
|
delegated: "On behalf of the initiator",
|
|
219
222
|
agent: "Agent rights",
|
|
223
|
+
"delegated-read": "Read with a person's rights",
|
|
220
224
|
"delegated-hint": "The agent used the rights of the person who started it.",
|
|
221
|
-
"agent-hint": "The agent used a right it was granted itself, beyond the rights of the people involved."
|
|
225
|
+
"agent-hint": "The agent used a right it was granted itself, beyond the rights of the people involved.",
|
|
226
|
+
"delegated-read-hint": "The agent read this through the application's data gateway with the rights of the person who started it, or else of the person it works for. Only that person sees the result."
|
|
222
227
|
},
|
|
223
|
-
restricted: "Shielded: the agent obtained this with
|
|
228
|
+
restricted: "Shielded: the agent obtained this with rights you do not have."
|
|
224
229
|
},
|
|
225
230
|
"tool-group": {
|
|
226
231
|
running: "Calling {{name}}…",
|
|
@@ -265,7 +270,14 @@ var en = {
|
|
|
265
270
|
"waiting-for-participant": "Waiting for the participant who started this task to decide.",
|
|
266
271
|
"waiting-for-approver": "Waiting for an approver to decide.",
|
|
267
272
|
"waiting-for-other-approver": "You started this work, so another approver decides.",
|
|
268
|
-
"give-feedback": "What was wrong?"
|
|
273
|
+
"give-feedback": "What was wrong?",
|
|
274
|
+
"stale-kind": {
|
|
275
|
+
"already-done": "Already done",
|
|
276
|
+
changed: "Changed",
|
|
277
|
+
"not-applicable": "No longer needed"
|
|
278
|
+
},
|
|
279
|
+
rationale: "Why: {{rationale}}",
|
|
280
|
+
superseded: "Replaced by a newer proposal"
|
|
269
281
|
},
|
|
270
282
|
"proposal-feedback": {
|
|
271
283
|
legend: "What was wrong? (optional)",
|
|
@@ -316,8 +328,10 @@ var en = {
|
|
|
316
328
|
"assistant-proposal-rejected": "Not run: the proposal was rejected.",
|
|
317
329
|
"assistant-proposal-expired": "Not run: nobody decided before the proposal expired.",
|
|
318
330
|
"assistant-proposal-withdrawn": "Not run: the proposal was withdrawn.",
|
|
319
|
-
"assistant-proposal-stale": "Not run: the
|
|
320
|
-
"assistant-proposal-execution-failed": "The approved proposal could not be run."
|
|
331
|
+
"assistant-proposal-stale": "Not run: the proposal no longer applied.",
|
|
332
|
+
"assistant-proposal-execution-failed": "The approved proposal could not be run.",
|
|
333
|
+
"assistant-proposal-already-open": "Not proposed again: the same proposal already waits.",
|
|
334
|
+
"assistant-proposal-recently-rejected": "Not proposed again: people rejected it recently."
|
|
321
335
|
},
|
|
322
336
|
errors: {
|
|
323
337
|
generic: "Something went wrong. Please try again.",
|
|
@@ -382,13 +396,36 @@ var en = {
|
|
|
382
396
|
"assistant-subject-access-denied": "Your role on this subject does not allow this.",
|
|
383
397
|
"assistant-no-accountable-owner": "Nobody answers for this agent on this subject.",
|
|
384
398
|
"assistant-agent-disabled": "This agent has been stopped.",
|
|
399
|
+
"assistant-agent-configured-off": "This agent is disabled in the application's configuration.",
|
|
400
|
+
"assistant-agent-paused": "This agent is paused; the request waits until it resumes.",
|
|
401
|
+
"assistant-agent-stopped": "This agent has been stopped.",
|
|
402
|
+
"assistant-run-token-limit": "This run stopped because it reached its token budget. What it did so far stays; an approver can resume it.",
|
|
403
|
+
"assistant-skill-stopped": "This skill of the agent has been stopped.",
|
|
404
|
+
"assistant-skill-paused": "This skill of the agent is paused; its events wait until it resumes.",
|
|
405
|
+
"assistant-skill-not-found": "The agent has no such skill.",
|
|
406
|
+
"assistant-skill-not-available": "That skill is not available now.",
|
|
407
|
+
"assistant-skill-switch-limit": "The run already switched skills as often as allowed.",
|
|
408
|
+
"assistant-handoff-unavailable": "Only an agent run can hand work to another agent.",
|
|
409
|
+
"assistant-handoff-not-accepted": "That agent does not accept this work from this agent.",
|
|
410
|
+
"assistant-handoff-subject-unavailable": "The subject does not exist or belongs to another organisation.",
|
|
411
|
+
"assistant-handoff-shadow-to-live": "An agent in shadow mode cannot hand work to an agent that works for real.",
|
|
412
|
+
"assistant-handoff-chain-limit": "The chain of hand-offs is as long as allowed or would return to an agent in it.",
|
|
413
|
+
"assistant-handoff-limit-reached": "This agent handed this subject to that agent as often as allowed today.",
|
|
414
|
+
"assistant-replay-not-shadow": "Only an agent in shadow mode can receive a replay, from another agent.",
|
|
415
|
+
"assistant-replay-active": "A replay into this variant is still running.",
|
|
416
|
+
"assistant-evaluation-not-variant": "That agent is not a shadow variant to compare with.",
|
|
385
417
|
"assistant-agent-not-configured": "This agent cannot run on its own.",
|
|
386
418
|
"assistant-run-not-found": "The run was not found.",
|
|
387
419
|
"assistant-run-not-retryable": "This run cannot be retried.",
|
|
388
420
|
"assistant-approval-policy-denied": "You may not decide this proposal.",
|
|
389
421
|
"assistant-four-eyes-required": "Someone other than the person who started this must decide it.",
|
|
390
422
|
"assistant-execution-not-uncertain": "This execution is not waiting to be resolved.",
|
|
391
|
-
"assistant-proposal-stale": "
|
|
423
|
+
"assistant-proposal-stale": "This proposal no longer applies, for example because the work was already done. Nothing was changed.",
|
|
424
|
+
"assistant-proposal-check-failed": "Whether this proposal still applies could not be checked, so nothing was changed. Try again later.",
|
|
425
|
+
"assistant-proposal-already-open": "The same proposal already waits for a decision.",
|
|
426
|
+
"assistant-proposal-recently-rejected": "People rejected the same proposal recently.",
|
|
427
|
+
"assistant-proposal-superseded": "A newer proposal replaced this one.",
|
|
428
|
+
"assistant-proposal-refused": "This action cannot be proposed by an automatic rule.",
|
|
392
429
|
"assistant-trigger-not-found": "The trigger was not found.",
|
|
393
430
|
"assistant-webhook-signature-invalid": "The webhook call has no valid signature.",
|
|
394
431
|
"assistant-webhook-payload-invalid": "The webhook call could not be read.",
|
|
@@ -504,7 +541,7 @@ var en = {
|
|
|
504
541
|
},
|
|
505
542
|
agents: {
|
|
506
543
|
title: "Agents",
|
|
507
|
-
description: "Code agents come from the application; you can override
|
|
544
|
+
description: "Code agents come from the application; you can override or reset them. Agents you create here can be deleted. Pause, stop and resume any agent; its definition stays as it is.",
|
|
508
545
|
"new": "New agent",
|
|
509
546
|
empty: "No agents yet.",
|
|
510
547
|
"source-code": "Code",
|
|
@@ -512,6 +549,7 @@ var en = {
|
|
|
512
549
|
overridden: "Overridden",
|
|
513
550
|
reset: "Reset to code",
|
|
514
551
|
"confirm-reset": "Confirm reset",
|
|
552
|
+
"reset-keeps-state": "Resetting restores the code definition; the agent stays active, paused or stopped as it is.",
|
|
515
553
|
version: "Version {{version}}",
|
|
516
554
|
"tool-count": "{{count}} tool selectors",
|
|
517
555
|
"server-count": "{{count}} MCP servers",
|
|
@@ -522,7 +560,44 @@ var en = {
|
|
|
522
560
|
simulate: "Simulate",
|
|
523
561
|
execute: "Execute"
|
|
524
562
|
},
|
|
525
|
-
feedback: "Feedback"
|
|
563
|
+
feedback: "Feedback",
|
|
564
|
+
evaluation: "Evaluation",
|
|
565
|
+
state: {
|
|
566
|
+
active: "Active",
|
|
567
|
+
paused: "Paused",
|
|
568
|
+
stopped: "Stopped",
|
|
569
|
+
"configured-off": "Off in configuration",
|
|
570
|
+
"configured-off-hint": "Disabled in the application's code until the next deployment; it cannot be resumed here.",
|
|
571
|
+
changed: "Changed by {{user}} on {{date}}.",
|
|
572
|
+
reason: "Reason: {{reason}}",
|
|
573
|
+
waiting: "{{count}} events wait for the resume.",
|
|
574
|
+
"reason-label": "Reason (optional)",
|
|
575
|
+
action: {
|
|
576
|
+
active: "Resume",
|
|
577
|
+
paused: "Pause",
|
|
578
|
+
stopped: "Stop"
|
|
579
|
+
},
|
|
580
|
+
explain: {
|
|
581
|
+
active: "The agent works again. Every subject with waiting events gets one run.",
|
|
582
|
+
paused: "No new runs start. Events wait and run after the resume; running work finishes and approved proposals execute.",
|
|
583
|
+
stopped: "Active runs are cancelled, their open proposals withdrawn and waiting events dropped. Approved proposals wait until the agent works again."
|
|
584
|
+
},
|
|
585
|
+
confirm: {
|
|
586
|
+
active: "Confirm resume",
|
|
587
|
+
paused: "Confirm pause",
|
|
588
|
+
stopped: "Confirm stop"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
skills: {
|
|
592
|
+
title: "Skills",
|
|
593
|
+
usage: "Today {{calls}} tool calls, {{tokens}} tokens",
|
|
594
|
+
budget: "Budget per day: {{calls}} tool calls, {{tokens}} tokens",
|
|
595
|
+
explain: {
|
|
596
|
+
active: "The skill {{skill}} works again. Every subject with events waiting for it gets one run.",
|
|
597
|
+
paused: "The skill {{skill}} starts no new runs: its events wait, triage no longer chooses it and running work finishes. The other skills keep working.",
|
|
598
|
+
stopped: "The runs of the skill {{skill}} are cancelled and its waiting events dropped; its triggers are refused. The other skills keep working."
|
|
599
|
+
}
|
|
600
|
+
}
|
|
526
601
|
},
|
|
527
602
|
"agent-editor": {
|
|
528
603
|
"new-title": "New agent",
|
|
@@ -537,7 +612,7 @@ var en = {
|
|
|
537
612
|
"autonomy-hint": "Only Execute allows changes, and every change still needs approval.",
|
|
538
613
|
"required-policy": "Required policy",
|
|
539
614
|
"required-policy-hint": "Optional. Only users who pass this policy see the agent.",
|
|
540
|
-
|
|
615
|
+
"state-hint": "Pause, stop and resume the agent from the agent list. Saving never changes its state.",
|
|
541
616
|
"tool-selectors": "Tool selectors",
|
|
542
617
|
"tool-selectors-hint": "Choose tools from the catalog or add a pattern such as sample-api.project.*. MCP tools come from the assigned servers.",
|
|
543
618
|
"add-selector": "Add pattern",
|
|
@@ -667,6 +742,7 @@ var en = {
|
|
|
667
742
|
expired: "Expired",
|
|
668
743
|
"rejection-rate": "Rejection rate",
|
|
669
744
|
"with-feedback": "Rejected with feedback",
|
|
745
|
+
invalidated: "No longer needed",
|
|
670
746
|
people: "People",
|
|
671
747
|
categories: "Top categories"
|
|
672
748
|
},
|
|
@@ -674,6 +750,7 @@ var en = {
|
|
|
674
750
|
consultations: "Consultations",
|
|
675
751
|
"no-decisions": "Not decided yet",
|
|
676
752
|
"no-categories": "None",
|
|
753
|
+
"invalidated-hint": "Open proposals that closed before anyone decided, because the work was already done or no longer applied. They do not count as rejected.",
|
|
677
754
|
"list-title": "Feedback",
|
|
678
755
|
"list-count": "{{count}} in total",
|
|
679
756
|
"list-empty": "Nobody gave feedback in this period.",
|
|
@@ -687,6 +764,77 @@ var en = {
|
|
|
687
764
|
next: "Next",
|
|
688
765
|
page: "Page {{page}} of {{pages}}",
|
|
689
766
|
pages: "Pages"
|
|
767
|
+
},
|
|
768
|
+
evaluation: {
|
|
769
|
+
back: "Back to the agents",
|
|
770
|
+
title: "Evaluation of shadow variants",
|
|
771
|
+
description: "Compares a shadow variant with the live agent: the runs that handled the same events, the proposals both made or only one made, what people decided about the live ones, and what each cost.",
|
|
772
|
+
"export-hint": "The export holds identifiers, statuses, usage and proposal identities, no messages or arguments. It is audited.",
|
|
773
|
+
refresh: "Refresh",
|
|
774
|
+
"export": "Export JSON Lines",
|
|
775
|
+
exporting: "Exporting…",
|
|
776
|
+
variant: "Variant",
|
|
777
|
+
period: "Period",
|
|
778
|
+
"runs-title": "Runs",
|
|
779
|
+
runs: {
|
|
780
|
+
live: "Live agent",
|
|
781
|
+
variant: "Variant",
|
|
782
|
+
paired: "Same event",
|
|
783
|
+
replayed: "Replayed",
|
|
784
|
+
"live-unpaired": "Live only",
|
|
785
|
+
"variant-unpaired": "Variant only"
|
|
786
|
+
},
|
|
787
|
+
"small-numbers": "Small numbers mislead: read the counts next to every share.",
|
|
788
|
+
"replayed-hint": "Replayed runs saw today's state of each subject; a subject that changed since can explain a difference.",
|
|
789
|
+
truncated: "The period holds more runs than one evaluation reads; it covers the oldest ones.",
|
|
790
|
+
"tools-title": "Proposals per tool",
|
|
791
|
+
"tools-empty": "The paired runs made no proposals.",
|
|
792
|
+
columns: {
|
|
793
|
+
tool: "Tool",
|
|
794
|
+
agreed: "Agreed",
|
|
795
|
+
"live-only": "Live only",
|
|
796
|
+
"variant-only": "Variant only",
|
|
797
|
+
"rejected-not-proposed": "Rejected live, not proposed",
|
|
798
|
+
"rejected-also-proposed": "Rejected live, also proposed",
|
|
799
|
+
"approved-missed": "Approved live, missed",
|
|
800
|
+
"live-decisions": "Decisions on live proposals",
|
|
801
|
+
measure: "Measure",
|
|
802
|
+
live: "Live agent",
|
|
803
|
+
variant: "Variant",
|
|
804
|
+
"live-skill": "Live skill",
|
|
805
|
+
"variant-skill": "Variant skill",
|
|
806
|
+
runs: "Runs"
|
|
807
|
+
},
|
|
808
|
+
decisions: "{{pending}} pending, {{approved}} approved, {{executed}} executed, {{rejected}} rejected, {{stale}} stale",
|
|
809
|
+
"cost-title": "Cost",
|
|
810
|
+
cost: {
|
|
811
|
+
runs: "Runs",
|
|
812
|
+
"model-calls": "Model calls per run",
|
|
813
|
+
tokens: "Tokens per run",
|
|
814
|
+
"tool-calls": "Tool calls per run",
|
|
815
|
+
"average-p95": "{{average}} on average, p95 {{p95}} ({{total}} in total)"
|
|
816
|
+
},
|
|
817
|
+
"routing-title": "Routing",
|
|
818
|
+
"no-skill": "Own tools",
|
|
819
|
+
"differences-title": "Differences",
|
|
820
|
+
kind: {
|
|
821
|
+
"live-only": "Live only",
|
|
822
|
+
"variant-only": "Variant only"
|
|
823
|
+
},
|
|
824
|
+
"live-status": "Live: {{status}}",
|
|
825
|
+
replayed: "Replayed",
|
|
826
|
+
"open-live": "Open the live thread",
|
|
827
|
+
"open-variant": "Open the variant's thread",
|
|
828
|
+
"replay-title": "Replay",
|
|
829
|
+
"replay-hint": "Fires the live agent's recorded runs of the period into the variant, oldest first, against today's state of each subject; at most {{max}} runs. The variant's budget and limits apply.",
|
|
830
|
+
"replay-runs": "Runs to replay",
|
|
831
|
+
replay: "Replay the period",
|
|
832
|
+
"replay-status": {
|
|
833
|
+
running: "Running",
|
|
834
|
+
completed: "Completed",
|
|
835
|
+
stopped: "Stopped"
|
|
836
|
+
},
|
|
837
|
+
"replay-progress": "{{replayed}} of at most {{max}} runs replayed, {{skipped}} skipped"
|
|
690
838
|
}
|
|
691
839
|
},
|
|
692
840
|
"page-context": {
|
|
@@ -828,7 +976,12 @@ var en = {
|
|
|
828
976
|
"give-feedback": "Give feedback",
|
|
829
977
|
"change-feedback": "Change feedback",
|
|
830
978
|
"your-feedback": "Your feedback: {{category}}",
|
|
831
|
-
"rejected-one": "You rejected: {{summary}}"
|
|
979
|
+
"rejected-one": "You rejected: {{summary}}",
|
|
980
|
+
closed: "Closed in the meantime",
|
|
981
|
+
dismiss: "Dismiss",
|
|
982
|
+
"dismiss-label": "Dismiss the closed proposal: {{summary}}",
|
|
983
|
+
"show-successor": "Show the newer proposal",
|
|
984
|
+
"stale-by": "Overtaken by {{actor}}"
|
|
832
985
|
},
|
|
833
986
|
run: {
|
|
834
987
|
empty: "No runs yet.",
|
|
@@ -841,7 +994,20 @@ var en = {
|
|
|
841
994
|
cancelled: "Cancelled"
|
|
842
995
|
},
|
|
843
996
|
shadow: "Shadow",
|
|
997
|
+
kind: {
|
|
998
|
+
rule: "Automatic rule",
|
|
999
|
+
"rule-then-model": "Rule, then the model"
|
|
1000
|
+
},
|
|
844
1001
|
trigger: "Trigger: {{trigger}}",
|
|
1002
|
+
skill: "Skill: {{skill}}",
|
|
1003
|
+
"handed-off-by": "Handed off by {{agent}}",
|
|
1004
|
+
"open-source-thread": "Open its thread",
|
|
1005
|
+
"skill-chosen-by": {
|
|
1006
|
+
trigger: "by its trigger",
|
|
1007
|
+
rules: "by the rules",
|
|
1008
|
+
triage: "by triage",
|
|
1009
|
+
model: "by the model"
|
|
1010
|
+
},
|
|
845
1011
|
"tool-calls": "{{count}} tool calls",
|
|
846
1012
|
tokens: "{{count}} tokens",
|
|
847
1013
|
proposals: "{{count}} proposals",
|
|
@@ -951,7 +1117,8 @@ var nl = {
|
|
|
951
1117
|
loading: "Gesprek laden",
|
|
952
1118
|
elapsed: "{{seconds}} s",
|
|
953
1119
|
participant: "Deelnemer",
|
|
954
|
-
trigger: "Gebeurtenis"
|
|
1120
|
+
trigger: "Gebeurtenis",
|
|
1121
|
+
rule: "Automatische regel"
|
|
955
1122
|
},
|
|
956
1123
|
composer: {
|
|
957
1124
|
label: "Bericht",
|
|
@@ -1004,10 +1171,12 @@ var nl = {
|
|
|
1004
1171
|
"grant-source": {
|
|
1005
1172
|
delegated: "Namens de starter",
|
|
1006
1173
|
agent: "Agentrechten",
|
|
1174
|
+
"delegated-read": "Gelezen met rechten van een persoon",
|
|
1007
1175
|
"delegated-hint": "De agent gebruikte de rechten van de persoon die hem startte.",
|
|
1008
|
-
"agent-hint": "De agent gebruikte een recht dat hij zelf heeft gekregen, boven de rechten van de betrokkenen uit."
|
|
1176
|
+
"agent-hint": "De agent gebruikte een recht dat hij zelf heeft gekregen, boven de rechten van de betrokkenen uit.",
|
|
1177
|
+
"delegated-read-hint": "De agent las dit via de datagateway van de applicatie met de rechten van wie hem startte, of anders van degene voor wie hij werkt. Alleen die persoon ziet het resultaat."
|
|
1009
1178
|
},
|
|
1010
|
-
restricted: "Afgeschermd: de agent kreeg dit met
|
|
1179
|
+
restricted: "Afgeschermd: de agent kreeg dit met rechten die jij niet hebt."
|
|
1011
1180
|
},
|
|
1012
1181
|
"tool-group": {
|
|
1013
1182
|
running: "Roept {{name}} aan…",
|
|
@@ -1052,7 +1221,14 @@ var nl = {
|
|
|
1052
1221
|
"waiting-for-participant": "Wacht op de beslissing van de deelnemer die deze taak startte.",
|
|
1053
1222
|
"waiting-for-approver": "Wacht tot een beslisser hierover beslist.",
|
|
1054
1223
|
"waiting-for-other-approver": "Jij startte dit werk, dus een andere beslisser beslist hierover.",
|
|
1055
|
-
"give-feedback": "Wat klopte er niet?"
|
|
1224
|
+
"give-feedback": "Wat klopte er niet?",
|
|
1225
|
+
"stale-kind": {
|
|
1226
|
+
"already-done": "Al gedaan",
|
|
1227
|
+
changed: "Gewijzigd",
|
|
1228
|
+
"not-applicable": "Niet meer nodig"
|
|
1229
|
+
},
|
|
1230
|
+
rationale: "Waarom: {{rationale}}",
|
|
1231
|
+
superseded: "Vervangen door een nieuwer voorstel"
|
|
1056
1232
|
},
|
|
1057
1233
|
"proposal-feedback": {
|
|
1058
1234
|
legend: "Wat klopte er niet? (optioneel)",
|
|
@@ -1103,8 +1279,10 @@ var nl = {
|
|
|
1103
1279
|
"assistant-proposal-rejected": "Niet uitgevoerd: het voorstel is afgewezen.",
|
|
1104
1280
|
"assistant-proposal-expired": "Niet uitgevoerd: niemand besliste voordat het voorstel verliep.",
|
|
1105
1281
|
"assistant-proposal-withdrawn": "Niet uitgevoerd: het voorstel is ingetrokken.",
|
|
1106
|
-
"assistant-proposal-stale": "Niet uitgevoerd: het
|
|
1107
|
-
"assistant-proposal-execution-failed": "Het goedgekeurde voorstel kon niet worden uitgevoerd."
|
|
1282
|
+
"assistant-proposal-stale": "Niet uitgevoerd: het voorstel was niet meer van toepassing.",
|
|
1283
|
+
"assistant-proposal-execution-failed": "Het goedgekeurde voorstel kon niet worden uitgevoerd.",
|
|
1284
|
+
"assistant-proposal-already-open": "Niet opnieuw voorgesteld: hetzelfde voorstel wacht al.",
|
|
1285
|
+
"assistant-proposal-recently-rejected": "Niet opnieuw voorgesteld: het is kort geleden afgewezen."
|
|
1108
1286
|
},
|
|
1109
1287
|
errors: {
|
|
1110
1288
|
generic: "Er ging iets mis. Probeer het opnieuw.",
|
|
@@ -1169,13 +1347,36 @@ var nl = {
|
|
|
1169
1347
|
"assistant-subject-access-denied": "Je rol op dit onderwerp staat dit niet toe.",
|
|
1170
1348
|
"assistant-no-accountable-owner": "Niemand staat voor deze agent op dit onderwerp in.",
|
|
1171
1349
|
"assistant-agent-disabled": "Deze agent is stopgezet.",
|
|
1350
|
+
"assistant-agent-configured-off": "Deze agent is uitgeschakeld in de configuratie van de applicatie.",
|
|
1351
|
+
"assistant-agent-paused": "Deze agent is gepauzeerd; het verzoek wacht tot hij hervat wordt.",
|
|
1352
|
+
"assistant-agent-stopped": "Deze agent is gestopt.",
|
|
1353
|
+
"assistant-run-token-limit": "Deze run is gestopt omdat hij zijn tokenbudget heeft bereikt. Wat hij al deed blijft staan; een goedkeurder kan hem hervatten.",
|
|
1354
|
+
"assistant-skill-stopped": "Deze vaardigheid van de agent is gestopt.",
|
|
1355
|
+
"assistant-skill-paused": "Deze vaardigheid van de agent is gepauzeerd; haar gebeurtenissen wachten tot ze hervat wordt.",
|
|
1356
|
+
"assistant-skill-not-found": "De agent heeft deze vaardigheid niet.",
|
|
1357
|
+
"assistant-skill-not-available": "Die vaardigheid is nu niet beschikbaar.",
|
|
1358
|
+
"assistant-skill-switch-limit": "De run is al zo vaak van vaardigheid gewisseld als mag.",
|
|
1359
|
+
"assistant-handoff-unavailable": "Alleen een agentrun kan werk overdragen aan een andere agent.",
|
|
1360
|
+
"assistant-handoff-not-accepted": "Die agent neemt dit werk niet aan van deze agent.",
|
|
1361
|
+
"assistant-handoff-subject-unavailable": "Het onderwerp bestaat niet of hoort bij een andere organisatie.",
|
|
1362
|
+
"assistant-handoff-shadow-to-live": "Een agent in schaduwmodus kan geen werk overdragen aan een agent die echt werkt.",
|
|
1363
|
+
"assistant-handoff-chain-limit": "De keten van overdrachten is zo lang als toegestaan of zou terugkeren naar een agent erin.",
|
|
1364
|
+
"assistant-handoff-limit-reached": "Deze agent heeft dit onderwerp vandaag zo vaak als toegestaan aan die agent overgedragen.",
|
|
1365
|
+
"assistant-replay-not-shadow": "Alleen een agent in schaduwmodus kan een herhaling ontvangen, van een andere agent.",
|
|
1366
|
+
"assistant-replay-active": "Er loopt nog een herhaling naar deze variant.",
|
|
1367
|
+
"assistant-evaluation-not-variant": "Die agent is geen schaduwvariant om mee te vergelijken.",
|
|
1172
1368
|
"assistant-agent-not-configured": "Deze agent kan niet zelfstandig werken.",
|
|
1173
1369
|
"assistant-run-not-found": "De run is niet gevonden.",
|
|
1174
1370
|
"assistant-run-not-retryable": "Deze run kan niet opnieuw worden gestart.",
|
|
1175
1371
|
"assistant-approval-policy-denied": "Je mag over dit voorstel niet beslissen.",
|
|
1176
1372
|
"assistant-four-eyes-required": "Iemand anders dan de starter moet hierover beslissen.",
|
|
1177
1373
|
"assistant-execution-not-uncertain": "Deze uitvoering wacht niet op afhandeling.",
|
|
1178
|
-
"assistant-proposal-stale": "
|
|
1374
|
+
"assistant-proposal-stale": "Dit voorstel is niet meer van toepassing, bijvoorbeeld omdat het werk al gedaan is. Er is niets gewijzigd.",
|
|
1375
|
+
"assistant-proposal-check-failed": "Kon niet controleren of dit voorstel nog van toepassing is, dus er is niets gewijzigd. Probeer het later opnieuw.",
|
|
1376
|
+
"assistant-proposal-already-open": "Hetzelfde voorstel wacht al op een besluit.",
|
|
1377
|
+
"assistant-proposal-recently-rejected": "Hetzelfde voorstel is kort geleden afgewezen.",
|
|
1378
|
+
"assistant-proposal-superseded": "Een nieuwer voorstel heeft dit voorstel vervangen.",
|
|
1379
|
+
"assistant-proposal-refused": "Deze actie kan niet door een automatische regel worden voorgesteld.",
|
|
1179
1380
|
"assistant-trigger-not-found": "De trigger is niet gevonden.",
|
|
1180
1381
|
"assistant-webhook-signature-invalid": "De webhook-aanroep heeft geen geldige handtekening.",
|
|
1181
1382
|
"assistant-webhook-payload-invalid": "De webhook-aanroep kon niet worden gelezen.",
|
|
@@ -1291,7 +1492,7 @@ var nl = {
|
|
|
1291
1492
|
},
|
|
1292
1493
|
agents: {
|
|
1293
1494
|
title: "Agents",
|
|
1294
|
-
description: "Code-agents komen uit de applicatie; je kunt ze overschrijven
|
|
1495
|
+
description: "Code-agents komen uit de applicatie; je kunt ze overschrijven of terugzetten. Agents die je hier aanmaakt, kun je verwijderen. Elke agent kun je pauzeren, stoppen en hervatten; de definitie blijft dan zoals hij is.",
|
|
1295
1496
|
"new": "Nieuwe agent",
|
|
1296
1497
|
empty: "Nog geen agents.",
|
|
1297
1498
|
"source-code": "Code",
|
|
@@ -1299,6 +1500,7 @@ var nl = {
|
|
|
1299
1500
|
overridden: "Overschreven",
|
|
1300
1501
|
reset: "Terugzetten naar code",
|
|
1301
1502
|
"confirm-reset": "Terugzetten bevestigen",
|
|
1503
|
+
"reset-keeps-state": "Terugzetten herstelt de definitie uit de code; de agent blijft actief, gepauzeerd of gestopt zoals hij is.",
|
|
1302
1504
|
version: "Versie {{version}}",
|
|
1303
1505
|
"tool-count": "{{count}} toolselectors",
|
|
1304
1506
|
"server-count": "{{count}} MCP-servers",
|
|
@@ -1309,7 +1511,44 @@ var nl = {
|
|
|
1309
1511
|
simulate: "Simuleren",
|
|
1310
1512
|
execute: "Uitvoeren"
|
|
1311
1513
|
},
|
|
1312
|
-
feedback: "Feedback"
|
|
1514
|
+
feedback: "Feedback",
|
|
1515
|
+
evaluation: "Evaluatie",
|
|
1516
|
+
state: {
|
|
1517
|
+
active: "Actief",
|
|
1518
|
+
paused: "Gepauzeerd",
|
|
1519
|
+
stopped: "Gestopt",
|
|
1520
|
+
"configured-off": "Uit in configuratie",
|
|
1521
|
+
"configured-off-hint": "Uitgeschakeld in de code van de applicatie tot de volgende deployment; hier kun je de agent niet hervatten.",
|
|
1522
|
+
changed: "Gewijzigd door {{user}} op {{date}}.",
|
|
1523
|
+
reason: "Reden: {{reason}}",
|
|
1524
|
+
waiting: "{{count}} gebeurtenissen wachten op het hervatten.",
|
|
1525
|
+
"reason-label": "Reden (optioneel)",
|
|
1526
|
+
action: {
|
|
1527
|
+
active: "Hervatten",
|
|
1528
|
+
paused: "Pauzeren",
|
|
1529
|
+
stopped: "Stoppen"
|
|
1530
|
+
},
|
|
1531
|
+
explain: {
|
|
1532
|
+
active: "De agent werkt weer. Elk onderwerp met wachtende gebeurtenissen krijgt één run.",
|
|
1533
|
+
paused: "Er starten geen nieuwe runs. Gebeurtenissen wachten en lopen na het hervatten; lopend werk wordt afgemaakt en goedgekeurde voorstellen worden uitgevoerd.",
|
|
1534
|
+
stopped: "Actieve runs worden geannuleerd, hun open voorstellen ingetrokken en wachtende gebeurtenissen vervallen. Goedgekeurde voorstellen wachten tot de agent weer werkt."
|
|
1535
|
+
},
|
|
1536
|
+
confirm: {
|
|
1537
|
+
active: "Hervatten bevestigen",
|
|
1538
|
+
paused: "Pauze bevestigen",
|
|
1539
|
+
stopped: "Stop bevestigen"
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
skills: {
|
|
1543
|
+
title: "Vaardigheden",
|
|
1544
|
+
usage: "Vandaag {{calls}} toolaanroepen, {{tokens}} tokens",
|
|
1545
|
+
budget: "Budget per dag: {{calls}} toolaanroepen, {{tokens}} tokens",
|
|
1546
|
+
explain: {
|
|
1547
|
+
active: "De vaardigheid {{skill}} werkt weer. Elk onderwerp met gebeurtenissen die erop wachten krijgt één run.",
|
|
1548
|
+
paused: "De vaardigheid {{skill}} start geen nieuwe runs: haar gebeurtenissen wachten, triage kiest haar niet meer en lopend werk wordt afgemaakt. De andere vaardigheden werken door.",
|
|
1549
|
+
stopped: "De runs van de vaardigheid {{skill}} worden geannuleerd en haar wachtende gebeurtenissen vervallen; haar triggers worden geweigerd. De andere vaardigheden werken door."
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1313
1552
|
},
|
|
1314
1553
|
"agent-editor": {
|
|
1315
1554
|
"new-title": "Nieuwe agent",
|
|
@@ -1324,7 +1563,7 @@ var nl = {
|
|
|
1324
1563
|
"autonomy-hint": "Alleen Uitvoeren staat wijzigingen toe, en elke wijziging vraagt nog steeds om goedkeuring.",
|
|
1325
1564
|
"required-policy": "Vereiste policy",
|
|
1326
1565
|
"required-policy-hint": "Optioneel. Alleen gebruikers die aan deze policy voldoen zien de agent.",
|
|
1327
|
-
|
|
1566
|
+
"state-hint": "Pauzeer, stop en hervat de agent vanuit de lijst met agents. Opslaan verandert de stand nooit.",
|
|
1328
1567
|
"tool-selectors": "Toolselectors",
|
|
1329
1568
|
"tool-selectors-hint": "Kies tools uit de catalogus of voeg een patroon toe, zoals sample-api.project.*. MCP-tools komen van de toegewezen servers.",
|
|
1330
1569
|
"add-selector": "Patroon toevoegen",
|
|
@@ -1454,6 +1693,7 @@ var nl = {
|
|
|
1454
1693
|
expired: "Verlopen",
|
|
1455
1694
|
"rejection-rate": "Afwijzingspercentage",
|
|
1456
1695
|
"with-feedback": "Afgewezen met feedback",
|
|
1696
|
+
invalidated: "Niet meer nodig",
|
|
1457
1697
|
people: "Personen",
|
|
1458
1698
|
categories: "Meest gekozen"
|
|
1459
1699
|
},
|
|
@@ -1461,6 +1701,7 @@ var nl = {
|
|
|
1461
1701
|
consultations: "Raadplegingen",
|
|
1462
1702
|
"no-decisions": "Nog niet beslist",
|
|
1463
1703
|
"no-categories": "Geen",
|
|
1704
|
+
"invalidated-hint": "Open voorstellen die sloten voordat iemand besliste, omdat het werk al gedaan was of niet meer van toepassing was. Ze tellen niet als afgewezen.",
|
|
1464
1705
|
"list-title": "Feedback",
|
|
1465
1706
|
"list-count": "{{count}} in totaal",
|
|
1466
1707
|
"list-empty": "Niemand gaf in deze periode feedback.",
|
|
@@ -1474,6 +1715,77 @@ var nl = {
|
|
|
1474
1715
|
next: "Volgende",
|
|
1475
1716
|
page: "Pagina {{page}} van {{pages}}",
|
|
1476
1717
|
pages: "Pagina's"
|
|
1718
|
+
},
|
|
1719
|
+
evaluation: {
|
|
1720
|
+
back: "Terug naar de agents",
|
|
1721
|
+
title: "Evaluatie van schaduwvarianten",
|
|
1722
|
+
description: "Vergelijkt een schaduwvariant met de live agent: de runs die dezelfde gebeurtenissen behandelden, de voorstellen die beide of maar één deed, wat mensen over de live voorstellen besloten, en wat elk kostte.",
|
|
1723
|
+
"export-hint": "De export bevat id's, statussen, gebruik en identiteiten van voorstellen, geen berichten of argumenten. De export wordt geaudit.",
|
|
1724
|
+
refresh: "Vernieuwen",
|
|
1725
|
+
"export": "Exporteren als JSON Lines",
|
|
1726
|
+
exporting: "Exporteren…",
|
|
1727
|
+
variant: "Variant",
|
|
1728
|
+
period: "Periode",
|
|
1729
|
+
"runs-title": "Runs",
|
|
1730
|
+
runs: {
|
|
1731
|
+
live: "Live agent",
|
|
1732
|
+
variant: "Variant",
|
|
1733
|
+
paired: "Zelfde gebeurtenis",
|
|
1734
|
+
replayed: "Herhaald",
|
|
1735
|
+
"live-unpaired": "Alleen live",
|
|
1736
|
+
"variant-unpaired": "Alleen variant"
|
|
1737
|
+
},
|
|
1738
|
+
"small-numbers": "Kleine aantallen misleiden: lees de aantallen naast elk percentage.",
|
|
1739
|
+
"replayed-hint": "Herhaalde runs zagen de huidige stand van elk onderwerp; een onderwerp dat sindsdien veranderde, kan een verschil verklaren.",
|
|
1740
|
+
truncated: "De periode bevat meer runs dan één evaluatie leest; ze dekt de oudste.",
|
|
1741
|
+
"tools-title": "Voorstellen per tool",
|
|
1742
|
+
"tools-empty": "De gekoppelde runs deden geen voorstellen.",
|
|
1743
|
+
columns: {
|
|
1744
|
+
tool: "Tool",
|
|
1745
|
+
agreed: "Gelijk",
|
|
1746
|
+
"live-only": "Alleen live",
|
|
1747
|
+
"variant-only": "Alleen variant",
|
|
1748
|
+
"rejected-not-proposed": "Live afgewezen, niet voorgesteld",
|
|
1749
|
+
"rejected-also-proposed": "Live afgewezen, ook voorgesteld",
|
|
1750
|
+
"approved-missed": "Live goedgekeurd, gemist",
|
|
1751
|
+
"live-decisions": "Besluiten over live voorstellen",
|
|
1752
|
+
measure: "Maat",
|
|
1753
|
+
live: "Live agent",
|
|
1754
|
+
variant: "Variant",
|
|
1755
|
+
"live-skill": "Vaardigheid live",
|
|
1756
|
+
"variant-skill": "Vaardigheid variant",
|
|
1757
|
+
runs: "Runs"
|
|
1758
|
+
},
|
|
1759
|
+
decisions: "{{pending}} open, {{approved}} goedgekeurd, {{executed}} uitgevoerd, {{rejected}} afgewezen, {{stale}} verouderd",
|
|
1760
|
+
"cost-title": "Kosten",
|
|
1761
|
+
cost: {
|
|
1762
|
+
runs: "Runs",
|
|
1763
|
+
"model-calls": "Modelaanroepen per run",
|
|
1764
|
+
tokens: "Tokens per run",
|
|
1765
|
+
"tool-calls": "Toolaanroepen per run",
|
|
1766
|
+
"average-p95": "gemiddeld {{average}}, p95 {{p95}} ({{total}} in totaal)"
|
|
1767
|
+
},
|
|
1768
|
+
"routing-title": "Routering",
|
|
1769
|
+
"no-skill": "Eigen tools",
|
|
1770
|
+
"differences-title": "Verschillen",
|
|
1771
|
+
kind: {
|
|
1772
|
+
"live-only": "Alleen live",
|
|
1773
|
+
"variant-only": "Alleen variant"
|
|
1774
|
+
},
|
|
1775
|
+
"live-status": "Live: {{status}}",
|
|
1776
|
+
replayed: "Herhaald",
|
|
1777
|
+
"open-live": "Open de live thread",
|
|
1778
|
+
"open-variant": "Open de thread van de variant",
|
|
1779
|
+
"replay-title": "Herhaling",
|
|
1780
|
+
"replay-hint": "Stuurt de vastgelegde runs van de live agent in de periode naar de variant, oudste eerst, tegen de huidige stand van elk onderwerp; hoogstens {{max}} runs. Het budget en de limieten van de variant gelden.",
|
|
1781
|
+
"replay-runs": "Te herhalen runs",
|
|
1782
|
+
replay: "Periode herhalen",
|
|
1783
|
+
"replay-status": {
|
|
1784
|
+
running: "Bezig",
|
|
1785
|
+
completed: "Voltooid",
|
|
1786
|
+
stopped: "Gestopt"
|
|
1787
|
+
},
|
|
1788
|
+
"replay-progress": "{{replayed}} van hoogstens {{max}} runs herhaald, {{skipped}} overgeslagen"
|
|
1477
1789
|
}
|
|
1478
1790
|
},
|
|
1479
1791
|
"page-context": {
|
|
@@ -1615,7 +1927,12 @@ var nl = {
|
|
|
1615
1927
|
"give-feedback": "Feedback geven",
|
|
1616
1928
|
"change-feedback": "Feedback wijzigen",
|
|
1617
1929
|
"your-feedback": "Jouw feedback: {{category}}",
|
|
1618
|
-
"rejected-one": "Je hebt afgewezen: {{summary}}"
|
|
1930
|
+
"rejected-one": "Je hebt afgewezen: {{summary}}",
|
|
1931
|
+
closed: "Intussen gesloten",
|
|
1932
|
+
dismiss: "Wegklikken",
|
|
1933
|
+
"dismiss-label": "Gesloten voorstel wegklikken: {{summary}}",
|
|
1934
|
+
"show-successor": "Toon het nieuwere voorstel",
|
|
1935
|
+
"stale-by": "Ingehaald door {{actor}}"
|
|
1619
1936
|
},
|
|
1620
1937
|
run: {
|
|
1621
1938
|
empty: "Nog geen runs.",
|
|
@@ -1628,7 +1945,20 @@ var nl = {
|
|
|
1628
1945
|
cancelled: "Geannuleerd"
|
|
1629
1946
|
},
|
|
1630
1947
|
shadow: "Schaduw",
|
|
1948
|
+
kind: {
|
|
1949
|
+
rule: "Automatische regel",
|
|
1950
|
+
"rule-then-model": "Regel, daarna het model"
|
|
1951
|
+
},
|
|
1631
1952
|
trigger: "Aanleiding: {{trigger}}",
|
|
1953
|
+
skill: "Vaardigheid: {{skill}}",
|
|
1954
|
+
"handed-off-by": "Overgedragen door {{agent}}",
|
|
1955
|
+
"open-source-thread": "Open de thread",
|
|
1956
|
+
"skill-chosen-by": {
|
|
1957
|
+
trigger: "door de trigger",
|
|
1958
|
+
rules: "door de regels",
|
|
1959
|
+
triage: "door triage",
|
|
1960
|
+
model: "door het model"
|
|
1961
|
+
},
|
|
1632
1962
|
"tool-calls": "{{count}} tool-aanroepen",
|
|
1633
1963
|
tokens: "{{count}} tokens",
|
|
1634
1964
|
proposals: "{{count}} voorstellen",
|
|
@@ -1933,11 +2263,27 @@ class NhAssistantAdminApiService {
|
|
|
1933
2263
|
updateAgent(agentId, request) {
|
|
1934
2264
|
return this.request('PUT', `admin/agents/${encodeURIComponent(agentId)}`, request);
|
|
1935
2265
|
}
|
|
1936
|
-
/** Restores a code agent to its definition in code. */
|
|
2266
|
+
/** Restores a code agent to its definition in code. The run state stays as it is. */
|
|
1937
2267
|
resetAgent(agentId) {
|
|
1938
2268
|
return this.request('POST', `admin/agents/${encodeURIComponent(agentId)}/reset`);
|
|
1939
2269
|
}
|
|
1940
|
-
|
|
2270
|
+
getAgentState(agentId) {
|
|
2271
|
+
return this.request('GET', `admin/agents/${encodeURIComponent(agentId)}/state`);
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Pauses, stops or resumes an agent without changing its definition. A code-disabled agent
|
|
2275
|
+
* cannot be resumed (`assistant-agent-configured-off`).
|
|
2276
|
+
*/
|
|
2277
|
+
setAgentState(agentId, request) {
|
|
2278
|
+
return this.request('POST', `admin/agents/${encodeURIComponent(agentId)}/state`, request);
|
|
2279
|
+
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Pauses, stops or resumes one skill of an agent; its other skills keep working.
|
|
2282
|
+
*/
|
|
2283
|
+
setSkillState(agentId, skillId, request) {
|
|
2284
|
+
return this.request('POST', `admin/agents/${encodeURIComponent(agentId)}/skills/${encodeURIComponent(skillId)}/state`, request);
|
|
2285
|
+
}
|
|
2286
|
+
/** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
|
|
1941
2287
|
deleteAgent(agentId) {
|
|
1942
2288
|
return this.request('DELETE', `admin/agents/${encodeURIComponent(agentId)}`);
|
|
1943
2289
|
}
|
|
@@ -1983,8 +2329,35 @@ class NhAssistantAdminApiService {
|
|
|
1983
2329
|
* Downloads the feedback as JSON Lines with the tool input of each proposal. The file holds
|
|
1984
2330
|
* subject data and the server audits the export. Rejects with `NhAssistantApiError`.
|
|
1985
2331
|
*/
|
|
1986
|
-
|
|
1987
|
-
|
|
2332
|
+
exportAgentFeedback(agentId, filter = {}) {
|
|
2333
|
+
return this.download(withQuery(`${feedbackPath(agentId)}/export`, filter));
|
|
2334
|
+
}
|
|
2335
|
+
/**
|
|
2336
|
+
* Compares a shadow variant with its live agent over a period: the runs that handled the same
|
|
2337
|
+
* events, the proposals per tool with what people decided about the live ones, cost and routing.
|
|
2338
|
+
*/
|
|
2339
|
+
getAgentEvaluation(agentId, filter) {
|
|
2340
|
+
return this.request('GET', withQuery(`${agentPath(agentId)}/evaluation`, filter));
|
|
2341
|
+
}
|
|
2342
|
+
/**
|
|
2343
|
+
* Downloads the paired runs of the comparison as JSON Lines: identifiers, statuses, usage and
|
|
2344
|
+
* proposal identities, no content. The server audits the export. Rejects with `NhAssistantApiError`.
|
|
2345
|
+
*/
|
|
2346
|
+
exportAgentEvaluation(agentId, filter) {
|
|
2347
|
+
return this.download(withQuery(`${agentPath(agentId)}/evaluation/export`, filter));
|
|
2348
|
+
}
|
|
2349
|
+
/**
|
|
2350
|
+
* Replays the recorded runs of another agent in a period into a shadow variant, against today's
|
|
2351
|
+
* state of each subject. One replay runs per variant (`assistant-replay-active`).
|
|
2352
|
+
*/
|
|
2353
|
+
startAgentReplay(variantId, request) {
|
|
2354
|
+
return this.request('POST', `${agentPath(variantId)}/replay`, request);
|
|
2355
|
+
}
|
|
2356
|
+
/** The latest replays into a shadow variant, newest first. */
|
|
2357
|
+
getAgentReplays(variantId) {
|
|
2358
|
+
return this.request('GET', `${agentPath(variantId)}/replays`);
|
|
2359
|
+
}
|
|
2360
|
+
async download(path) {
|
|
1988
2361
|
let response;
|
|
1989
2362
|
try {
|
|
1990
2363
|
response = await this.transport.fetch('GET', path, 'application/x-ndjson', undefined, new AbortController().signal);
|
|
@@ -2009,7 +2382,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
2009
2382
|
type: Injectable
|
|
2010
2383
|
}] });
|
|
2011
2384
|
function feedbackPath(agentId) {
|
|
2012
|
-
return
|
|
2385
|
+
return `${agentPath(agentId)}/feedback`;
|
|
2386
|
+
}
|
|
2387
|
+
function agentPath(agentId) {
|
|
2388
|
+
return `admin/agents/${encodeURIComponent(agentId)}`;
|
|
2013
2389
|
}
|
|
2014
2390
|
/** Appends the filter values that are set as query parameters. */
|
|
2015
2391
|
function withQuery(path, filter) {
|
|
@@ -2080,6 +2456,21 @@ class NhAssistantAgentRunApiService {
|
|
|
2080
2456
|
getProposals(conversationId) {
|
|
2081
2457
|
return this.transport.json('GET', `threads/${encodeURIComponent(conversationId)}/proposals`);
|
|
2082
2458
|
}
|
|
2459
|
+
/**
|
|
2460
|
+
* One proposal of an agent thread in any status, with the caller's live right to decide it, for
|
|
2461
|
+
* example the one an `AgentWorkChanged` update names. Fails with `assistant-approval-not-found`
|
|
2462
|
+
* for an unknown proposal and for one the caller may not see.
|
|
2463
|
+
*/
|
|
2464
|
+
getProposal(approvalId) {
|
|
2465
|
+
return this.transport.json('GET', `approvals/${encodeURIComponent(approvalId)}`);
|
|
2466
|
+
}
|
|
2467
|
+
/**
|
|
2468
|
+
* The proposals among at most `NH_ASSISTANT_MAX_PROPOSAL_LOOKUP` ids that the caller may see, in
|
|
2469
|
+
* the order of the ids, each with the caller's live right to decide it. The others are left out.
|
|
2470
|
+
*/
|
|
2471
|
+
lookupProposals(approvalIds) {
|
|
2472
|
+
return this.transport.json('POST', 'approvals/lookup', { approvalIds });
|
|
2473
|
+
}
|
|
2083
2474
|
getMemory(conversationId) {
|
|
2084
2475
|
return this.transport.json('GET', `threads/${encodeURIComponent(conversationId)}/memory`);
|
|
2085
2476
|
}
|
|
@@ -6320,7 +6711,8 @@ function formatNhAssistantCountdown(milliseconds) {
|
|
|
6320
6711
|
* Asks the user to approve or reject a proposed mutation. Shows the summary, targets,
|
|
6321
6712
|
* proposed arguments and a countdown to expiry. A decision is emitted at most once until
|
|
6322
6713
|
* the host reports that it is no longer deciding. After the user rejected an agent's proposal
|
|
6323
|
-
* (`canGiveFeedback`), a low-key action asks what was wrong.
|
|
6714
|
+
* (`canGiveFeedback`), a low-key action asks what was wrong. A proposal that closed because it no
|
|
6715
|
+
* longer fits shows why, such as "Already done", with the application's explanation.
|
|
6324
6716
|
*/
|
|
6325
6717
|
class NhAssistantApprovalCardComponent {
|
|
6326
6718
|
constructor() {
|
|
@@ -6357,6 +6749,23 @@ class NhAssistantApprovalCardComponent {
|
|
|
6357
6749
|
this.expired = computed(() => this.approval().status === 'expired' ||
|
|
6358
6750
|
(this.approval().status === 'pending' && this.remainingMs() <= 0), ...(ngDevMode ? [{ debugName: "expired" }] : []));
|
|
6359
6751
|
this.effectiveStatus = computed(() => this.expired() ? 'expired' : this.approval().status, ...(ngDevMode ? [{ debugName: "effectiveStatus" }] : []));
|
|
6752
|
+
/**
|
|
6753
|
+
* Translation key of the status: the kind of a stale proposal, "replaced" for a superseded one,
|
|
6754
|
+
* otherwise the status itself.
|
|
6755
|
+
*/
|
|
6756
|
+
this.statusKey = computed(() => {
|
|
6757
|
+
const kind = this.approval().staleKind;
|
|
6758
|
+
if (this.effectiveStatus() === 'stale' && kind) {
|
|
6759
|
+
return `nh-assistant.approval.stale-kind.${kind}`;
|
|
6760
|
+
}
|
|
6761
|
+
return this.effectiveStatus() === 'withdrawn' && this.approval().supersededByApprovalId
|
|
6762
|
+
? 'nh-assistant.approval.superseded'
|
|
6763
|
+
: `nh-assistant.approval.status.${this.effectiveStatus()}`;
|
|
6764
|
+
}, ...(ngDevMode ? [{ debugName: "statusKey" }] : []));
|
|
6765
|
+
/** Why the agent's rules proposed it; model proposals have none. */
|
|
6766
|
+
this.rationale = computed(() => this.approval().rationale ?? null, ...(ngDevMode ? [{ debugName: "rationale" }] : []));
|
|
6767
|
+
/** The application's explanation of a stale proposal, such as who already did the work. */
|
|
6768
|
+
this.staleExplanation = computed(() => this.effectiveStatus() === 'stale' ? this.approval().staleExplanation ?? null : null, ...(ngDevMode ? [{ debugName: "staleExplanation" }] : []));
|
|
6360
6769
|
this.actionable = computed(() => this.effectiveStatus() === 'pending', ...(ngDevMode ? [{ debugName: "actionable" }] : []));
|
|
6361
6770
|
this.succeeded = computed(() => ['approved', 'executing', 'executed', 'resolved'].includes(this.effectiveStatus()), ...(ngDevMode ? [{ debugName: "succeeded" }] : []));
|
|
6362
6771
|
this.disabled = computed(() => !this.actionable() || !this.canDecide() || this.deciding() || this.submitted(), ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
@@ -6416,13 +6825,13 @@ class NhAssistantApprovalCardComponent {
|
|
|
6416
6825
|
this.feedbackToggle()?.nativeElement.focus();
|
|
6417
6826
|
}
|
|
6418
6827
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NhAssistantApprovalCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6419
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: NhAssistantApprovalCardComponent, isStandalone: true, selector: "nh-assistant-approval-card", inputs: { approval: { classPropertyName: "approval", publicName: "approval", isSignal: true, isRequired: true, transformFunction: null }, deciding: { classPropertyName: "deciding", publicName: "deciding", isSignal: true, isRequired: false, transformFunction: null }, canDecide: { classPropertyName: "canDecide", publicName: "canDecide", isSignal: true, isRequired: false, transformFunction: null }, decisionOwner: { classPropertyName: "decisionOwner", publicName: "decisionOwner", isSignal: true, isRequired: false, transformFunction: null }, waitingFor: { classPropertyName: "waitingFor", publicName: "waitingFor", isSignal: true, isRequired: false, transformFunction: null }, canGiveFeedback: { classPropertyName: "canGiveFeedback", publicName: "canGiveFeedback", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { decide: "decide" }, host: { properties: { "attr.data-status": "effectiveStatus()" } }, viewQueries: [{ propertyName: "feedbackToggle", first: true, predicate: ["feedbackToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"card\" [attr.aria-label]=\"'nh-assistant.approval.title' | translate\">\n <header class=\"header\">\n <nh-assistant-icon [name]=\"actionable() ? 'warning' : succeeded() ? 'check' : 'x'\" />\n <h3>{{ 'nh-assistant.approval.title' | translate }}</h3>\n <span class=\"status\">{{ 'nh-assistant.approval.status.' + effectiveStatus() | translate }}</span>\n </header>\n\n @if (approval().presentation; as presentation) {\n <p class=\"tool-name\">{{ presentation.toolDisplayName }}</p>\n <p class=\"summary\">{{ presentation.summary }}</p>\n @if (presentation.fields.length > 0) {\n <dl class=\"presentation-fields\">\n @for (field of presentation.fields; track $index) {\n <div>\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n @if (presentation.notice) {\n <p class=\"notice\">{{ presentation.notice }}</p>\n }\n } @else {\n <p class=\"summary\">{{ 'nh-assistant.approval.fallback-summary' | translate }}</p>\n }\n\n <details class=\"technical-details\">\n <summary>{{ 'nh-assistant.approval.technical-details' | translate }}</summary>\n <p class=\"label\">{{ 'nh-assistant.approval.tool-id' | translate }}</p>\n <code>{{ approval().toolId }}</code>\n @if (approval().targets.length > 0) {\n <p class=\"label\">{{ 'nh-assistant.approval.targets' | translate }}</p>\n <ul class=\"targets\">\n @for (target of approval().targets; track $index) {\n <li>{{ target }}</li>\n }\n </ul>\n }\n @if (approval().argumentsPreview) {\n <p class=\"label\">{{ 'nh-assistant.approval.arguments' | translate }}</p>\n <pre>{{ approval().argumentsPreview }}</pre>\n }\n </details>\n\n @if (actionable() && !canDecide()) {\n <p class=\"waiting-for-other\" role=\"status\">\n <nh-assistant-icon name=\"users\" />\n {{ waitingKey() | translate: { name: decisionOwner() } }}\n </p>\n } @else if (actionable()) {\n <p class=\"expiry\" aria-live=\"off\">\n <nh-assistant-icon name=\"clock\" />\n {{ 'nh-assistant.approval.expires-in' | translate: { time: countdown() } }}\n </p>\n <div class=\"actions\">\n <button\n class=\"reject\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.reject-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('reject')\">\n {{ 'nh-assistant.approval.reject' | translate }}\n </button>\n <button\n class=\"approve\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.approve-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('approve')\">\n {{ 'nh-assistant.approval.approve' | translate }}\n </button>\n </div>\n @if (deciding()) {\n <p class=\"deciding\" role=\"status\">{{ 'nh-assistant.approval.deciding' | translate }}</p>\n }\n } @else if (expired()) {\n <p class=\"expiry\">{{ 'nh-assistant.approval.expired' | translate }}</p>\n }\n\n @if (feedbackAvailable()) {\n @if (!feedbackSaved()) {\n <button\n #feedbackToggle\n class=\"feedback-toggle\"\n type=\"button\"\n [attr.aria-expanded]=\"feedbackOpen()\"\n [attr.aria-controls]=\"feedbackOpen() ? feedbackPanelId : null\"\n (click)=\"toggleFeedback()\">\n {{ 'nh-assistant.approval.give-feedback' | translate }}\n </button>\n }\n @if (feedbackOpen()) {\n <nh-assistant-proposal-feedback\n class=\"feedback\"\n [attr.id]=\"feedbackPanelId\"\n [approvalIds]=\"feedbackIds()\"\n (saved)=\"onFeedbackSaved()\"\n (dismissed)=\"onFeedbackDismissed()\" />\n }\n }\n</section>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:block;--nha-status-color: var(--nha-warning);--nha-status-background: var(--nha-warning-soft)}:host([data-status=approved]){--nha-status-color: var(--nha-success);--nha-status-background: var(--nha-success-soft)}:host([data-status=rejected]),:host([data-status=expired]){--nha-status-color: var(--nha-text-muted);--nha-status-background: var(--nha-surface-strong)}.card{border:1px solid var(--nha-status-color);border-radius:var(--nha-radius-control);padding:12px;color:var(--nha-text);background:var(--nha-background)}.header{display:flex;align-items:center;gap:8px;color:var(--nha-status-color)}h3{flex:1;margin:0;color:var(--nha-text);font-size:14px;font-weight:700}.status{border-radius:999px;padding:2px 8px;color:var(--nha-status-color);background:var(--nha-status-background);font-size:11px;font-weight:700}.summary{margin:8px 0 0;font-size:14px;overflow-wrap:anywhere}.tool-name{margin:10px 0 0;font-size:12px;font-weight:700}.presentation-fields{display:grid;gap:6px;margin:10px 0 0}.presentation-fields div{display:grid;grid-template-columns:minmax(90px,.4fr) minmax(0,1fr);gap:8px}.presentation-fields dt{color:var(--nha-text-muted);font-size:12px;font-weight:700;overflow-wrap:anywhere}.presentation-fields dd{margin:0;overflow-wrap:anywhere;font-size:13px}.notice{margin:10px 0 0;color:var(--nha-text-muted);font-size:12px}.technical-details{margin-top:10px;color:var(--nha-text-muted);font-size:12px}.technical-details summary{cursor:pointer;font-weight:700}.technical-details code{overflow-wrap:anywhere}.label{margin:10px 0 4px;color:var(--nha-text-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.targets{margin:0;padding-left:18px;font-size:13px;overflow-wrap:anywhere}pre{max-height:160px;margin:0;overflow:auto;border-radius:8px;padding:8px;background:var(--nha-surface);font-family:var(--nha-mono);font-size:12px;white-space:pre-wrap;word-break:break-word}.expiry,.deciding,.waiting-for-other{display:flex;align-items:center;gap:6px;margin:10px 0 0;color:var(--nha-text-muted);font-size:12px;font-variant-numeric:tabular-nums}.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:12px}button{min-height:36px;border:1px solid var(--nha-border);border-radius:var(--nha-radius-control);padding:6px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}button:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.55}.reject{color:var(--nha-text);background:transparent}.reject:hover:not(:disabled){background:var(--nha-surface-strong)}.approve{border-color:var(--nha-accent);color:var(--nha-accent-contrast);background:var(--nha-accent)}.approve:hover:not(:disabled){filter:brightness(1.12)}.feedback-toggle{display:inline-flex;min-height:0;margin-top:10px;border:0;border-radius:6px;padding:2px 0;color:var(--nha-text-muted);background:transparent;font-size:12px;font-weight:650;text-decoration:underline;text-underline-offset:2px}.feedback-toggle:hover:not(:disabled){color:var(--nha-text)}.feedback{display:block;margin-top:10px}\n"], dependencies: [{ kind: "component", type: NhAssistantIconComponent, selector: "nh-assistant-icon", inputs: ["name"] }, { kind: "component", type: NhAssistantProposalFeedbackComponent, selector: "nh-assistant-proposal-feedback", inputs: ["approvalIds", "initial"], outputs: ["saved", "dismissed"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6828
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: NhAssistantApprovalCardComponent, isStandalone: true, selector: "nh-assistant-approval-card", inputs: { approval: { classPropertyName: "approval", publicName: "approval", isSignal: true, isRequired: true, transformFunction: null }, deciding: { classPropertyName: "deciding", publicName: "deciding", isSignal: true, isRequired: false, transformFunction: null }, canDecide: { classPropertyName: "canDecide", publicName: "canDecide", isSignal: true, isRequired: false, transformFunction: null }, decisionOwner: { classPropertyName: "decisionOwner", publicName: "decisionOwner", isSignal: true, isRequired: false, transformFunction: null }, waitingFor: { classPropertyName: "waitingFor", publicName: "waitingFor", isSignal: true, isRequired: false, transformFunction: null }, canGiveFeedback: { classPropertyName: "canGiveFeedback", publicName: "canGiveFeedback", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { decide: "decide" }, host: { properties: { "attr.data-status": "effectiveStatus()" } }, viewQueries: [{ propertyName: "feedbackToggle", first: true, predicate: ["feedbackToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"card\" [attr.aria-label]=\"'nh-assistant.approval.title' | translate\">\n <header class=\"header\">\n <nh-assistant-icon [name]=\"actionable() ? 'warning' : succeeded() ? 'check' : 'x'\" />\n <h3>{{ 'nh-assistant.approval.title' | translate }}</h3>\n <span class=\"status\">{{ statusKey() | translate }}</span>\n </header>\n\n @if (staleExplanation(); as explanation) {\n <p class=\"stale-explanation\">{{ explanation }}</p>\n }\n\n @if (approval().presentation; as presentation) {\n <p class=\"tool-name\">{{ presentation.toolDisplayName }}</p>\n <p class=\"summary\">{{ presentation.summary }}</p>\n @if (presentation.fields.length > 0) {\n <dl class=\"presentation-fields\">\n @for (field of presentation.fields; track $index) {\n <div>\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n @if (presentation.notice) {\n <p class=\"notice\">{{ presentation.notice }}</p>\n }\n } @else {\n <p class=\"summary\">{{ 'nh-assistant.approval.fallback-summary' | translate }}</p>\n }\n\n @if (rationale(); as why) {\n <p class=\"rationale\">{{ 'nh-assistant.approval.rationale' | translate: { rationale: why } }}</p>\n }\n\n <details class=\"technical-details\">\n <summary>{{ 'nh-assistant.approval.technical-details' | translate }}</summary>\n <p class=\"label\">{{ 'nh-assistant.approval.tool-id' | translate }}</p>\n <code>{{ approval().toolId }}</code>\n @if (approval().targets.length > 0) {\n <p class=\"label\">{{ 'nh-assistant.approval.targets' | translate }}</p>\n <ul class=\"targets\">\n @for (target of approval().targets; track $index) {\n <li>{{ target }}</li>\n }\n </ul>\n }\n @if (approval().argumentsPreview) {\n <p class=\"label\">{{ 'nh-assistant.approval.arguments' | translate }}</p>\n <pre>{{ approval().argumentsPreview }}</pre>\n }\n </details>\n\n @if (actionable() && !canDecide()) {\n <p class=\"waiting-for-other\" role=\"status\">\n <nh-assistant-icon name=\"users\" />\n {{ waitingKey() | translate: { name: decisionOwner() } }}\n </p>\n } @else if (actionable()) {\n <p class=\"expiry\" aria-live=\"off\">\n <nh-assistant-icon name=\"clock\" />\n {{ 'nh-assistant.approval.expires-in' | translate: { time: countdown() } }}\n </p>\n <div class=\"actions\">\n <button\n class=\"reject\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.reject-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('reject')\">\n {{ 'nh-assistant.approval.reject' | translate }}\n </button>\n <button\n class=\"approve\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.approve-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('approve')\">\n {{ 'nh-assistant.approval.approve' | translate }}\n </button>\n </div>\n @if (deciding()) {\n <p class=\"deciding\" role=\"status\">{{ 'nh-assistant.approval.deciding' | translate }}</p>\n }\n } @else if (expired()) {\n <p class=\"expiry\">{{ 'nh-assistant.approval.expired' | translate }}</p>\n }\n\n @if (feedbackAvailable()) {\n @if (!feedbackSaved()) {\n <button\n #feedbackToggle\n class=\"feedback-toggle\"\n type=\"button\"\n [attr.aria-expanded]=\"feedbackOpen()\"\n [attr.aria-controls]=\"feedbackOpen() ? feedbackPanelId : null\"\n (click)=\"toggleFeedback()\">\n {{ 'nh-assistant.approval.give-feedback' | translate }}\n </button>\n }\n @if (feedbackOpen()) {\n <nh-assistant-proposal-feedback\n class=\"feedback\"\n [attr.id]=\"feedbackPanelId\"\n [approvalIds]=\"feedbackIds()\"\n (saved)=\"onFeedbackSaved()\"\n (dismissed)=\"onFeedbackDismissed()\" />\n }\n }\n</section>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:block;--nha-status-color: var(--nha-warning);--nha-status-background: var(--nha-warning-soft)}:host([data-status=approved]){--nha-status-color: var(--nha-success);--nha-status-background: var(--nha-success-soft)}:host([data-status=rejected]),:host([data-status=expired]),:host([data-status=stale]){--nha-status-color: var(--nha-text-muted);--nha-status-background: var(--nha-surface-strong)}.card{border:1px solid var(--nha-status-color);border-radius:var(--nha-radius-control);padding:12px;color:var(--nha-text);background:var(--nha-background)}.header{display:flex;align-items:center;gap:8px;color:var(--nha-status-color)}h3{flex:1;margin:0;color:var(--nha-text);font-size:14px;font-weight:700}.status{border-radius:999px;padding:2px 8px;color:var(--nha-status-color);background:var(--nha-status-background);font-size:11px;font-weight:700}.summary{margin:8px 0 0;font-size:14px;overflow-wrap:anywhere}.tool-name{margin:10px 0 0;font-size:12px;font-weight:700}.presentation-fields{display:grid;gap:6px;margin:10px 0 0}.presentation-fields div{display:grid;grid-template-columns:minmax(90px,.4fr) minmax(0,1fr);gap:8px}.presentation-fields dt{color:var(--nha-text-muted);font-size:12px;font-weight:700;overflow-wrap:anywhere}.presentation-fields dd{margin:0;overflow-wrap:anywhere;font-size:13px}.notice{margin:10px 0 0;color:var(--nha-text-muted);font-size:12px}.stale-explanation{margin:8px 0 0;border-radius:8px;padding:8px 10px;color:var(--nha-text);background:var(--nha-surface-strong);font-size:13px;overflow-wrap:anywhere}.rationale{margin:8px 0 0;color:var(--nha-text-muted);font-size:13px;overflow-wrap:anywhere}.technical-details{margin-top:10px;color:var(--nha-text-muted);font-size:12px}.technical-details summary{cursor:pointer;font-weight:700}.technical-details code{overflow-wrap:anywhere}.label{margin:10px 0 4px;color:var(--nha-text-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.targets{margin:0;padding-left:18px;font-size:13px;overflow-wrap:anywhere}pre{max-height:160px;margin:0;overflow:auto;border-radius:8px;padding:8px;background:var(--nha-surface);font-family:var(--nha-mono);font-size:12px;white-space:pre-wrap;word-break:break-word}.expiry,.deciding,.waiting-for-other{display:flex;align-items:center;gap:6px;margin:10px 0 0;color:var(--nha-text-muted);font-size:12px;font-variant-numeric:tabular-nums}.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:12px}button{min-height:36px;border:1px solid var(--nha-border);border-radius:var(--nha-radius-control);padding:6px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}button:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.55}.reject{color:var(--nha-text);background:transparent}.reject:hover:not(:disabled){background:var(--nha-surface-strong)}.approve{border-color:var(--nha-accent);color:var(--nha-accent-contrast);background:var(--nha-accent)}.approve:hover:not(:disabled){filter:brightness(1.12)}.feedback-toggle{display:inline-flex;min-height:0;margin-top:10px;border:0;border-radius:6px;padding:2px 0;color:var(--nha-text-muted);background:transparent;font-size:12px;font-weight:650;text-decoration:underline;text-underline-offset:2px}.feedback-toggle:hover:not(:disabled){color:var(--nha-text)}.feedback{display:block;margin-top:10px}\n"], dependencies: [{ kind: "component", type: NhAssistantIconComponent, selector: "nh-assistant-icon", inputs: ["name"] }, { kind: "component", type: NhAssistantProposalFeedbackComponent, selector: "nh-assistant-proposal-feedback", inputs: ["approvalIds", "initial"], outputs: ["saved", "dismissed"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6420
6829
|
}
|
|
6421
6830
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NhAssistantApprovalCardComponent, decorators: [{
|
|
6422
6831
|
type: Component,
|
|
6423
6832
|
args: [{ selector: 'nh-assistant-approval-card', standalone: true, imports: [TranslatePipe, NhAssistantIconComponent, NhAssistantProposalFeedbackComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6424
6833
|
'[attr.data-status]': 'effectiveStatus()'
|
|
6425
|
-
}, template: "<section class=\"card\" [attr.aria-label]=\"'nh-assistant.approval.title' | translate\">\n <header class=\"header\">\n <nh-assistant-icon [name]=\"actionable() ? 'warning' : succeeded() ? 'check' : 'x'\" />\n <h3>{{ 'nh-assistant.approval.title' | translate }}</h3>\n <span class=\"status\">{{ 'nh-assistant.approval.status.' + effectiveStatus() | translate }}</span>\n </header>\n\n @if (approval().presentation; as presentation) {\n <p class=\"tool-name\">{{ presentation.toolDisplayName }}</p>\n <p class=\"summary\">{{ presentation.summary }}</p>\n @if (presentation.fields.length > 0) {\n <dl class=\"presentation-fields\">\n @for (field of presentation.fields; track $index) {\n <div>\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n @if (presentation.notice) {\n <p class=\"notice\">{{ presentation.notice }}</p>\n }\n } @else {\n <p class=\"summary\">{{ 'nh-assistant.approval.fallback-summary' | translate }}</p>\n }\n\n <details class=\"technical-details\">\n <summary>{{ 'nh-assistant.approval.technical-details' | translate }}</summary>\n <p class=\"label\">{{ 'nh-assistant.approval.tool-id' | translate }}</p>\n <code>{{ approval().toolId }}</code>\n @if (approval().targets.length > 0) {\n <p class=\"label\">{{ 'nh-assistant.approval.targets' | translate }}</p>\n <ul class=\"targets\">\n @for (target of approval().targets; track $index) {\n <li>{{ target }}</li>\n }\n </ul>\n }\n @if (approval().argumentsPreview) {\n <p class=\"label\">{{ 'nh-assistant.approval.arguments' | translate }}</p>\n <pre>{{ approval().argumentsPreview }}</pre>\n }\n </details>\n\n @if (actionable() && !canDecide()) {\n <p class=\"waiting-for-other\" role=\"status\">\n <nh-assistant-icon name=\"users\" />\n {{ waitingKey() | translate: { name: decisionOwner() } }}\n </p>\n } @else if (actionable()) {\n <p class=\"expiry\" aria-live=\"off\">\n <nh-assistant-icon name=\"clock\" />\n {{ 'nh-assistant.approval.expires-in' | translate: { time: countdown() } }}\n </p>\n <div class=\"actions\">\n <button\n class=\"reject\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.reject-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('reject')\">\n {{ 'nh-assistant.approval.reject' | translate }}\n </button>\n <button\n class=\"approve\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.approve-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('approve')\">\n {{ 'nh-assistant.approval.approve' | translate }}\n </button>\n </div>\n @if (deciding()) {\n <p class=\"deciding\" role=\"status\">{{ 'nh-assistant.approval.deciding' | translate }}</p>\n }\n } @else if (expired()) {\n <p class=\"expiry\">{{ 'nh-assistant.approval.expired' | translate }}</p>\n }\n\n @if (feedbackAvailable()) {\n @if (!feedbackSaved()) {\n <button\n #feedbackToggle\n class=\"feedback-toggle\"\n type=\"button\"\n [attr.aria-expanded]=\"feedbackOpen()\"\n [attr.aria-controls]=\"feedbackOpen() ? feedbackPanelId : null\"\n (click)=\"toggleFeedback()\">\n {{ 'nh-assistant.approval.give-feedback' | translate }}\n </button>\n }\n @if (feedbackOpen()) {\n <nh-assistant-proposal-feedback\n class=\"feedback\"\n [attr.id]=\"feedbackPanelId\"\n [approvalIds]=\"feedbackIds()\"\n (saved)=\"onFeedbackSaved()\"\n (dismissed)=\"onFeedbackDismissed()\" />\n }\n }\n</section>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:block;--nha-status-color: var(--nha-warning);--nha-status-background: var(--nha-warning-soft)}:host([data-status=approved]){--nha-status-color: var(--nha-success);--nha-status-background: var(--nha-success-soft)}:host([data-status=rejected]),:host([data-status=expired]){--nha-status-color: var(--nha-text-muted);--nha-status-background: var(--nha-surface-strong)}.card{border:1px solid var(--nha-status-color);border-radius:var(--nha-radius-control);padding:12px;color:var(--nha-text);background:var(--nha-background)}.header{display:flex;align-items:center;gap:8px;color:var(--nha-status-color)}h3{flex:1;margin:0;color:var(--nha-text);font-size:14px;font-weight:700}.status{border-radius:999px;padding:2px 8px;color:var(--nha-status-color);background:var(--nha-status-background);font-size:11px;font-weight:700}.summary{margin:8px 0 0;font-size:14px;overflow-wrap:anywhere}.tool-name{margin:10px 0 0;font-size:12px;font-weight:700}.presentation-fields{display:grid;gap:6px;margin:10px 0 0}.presentation-fields div{display:grid;grid-template-columns:minmax(90px,.4fr) minmax(0,1fr);gap:8px}.presentation-fields dt{color:var(--nha-text-muted);font-size:12px;font-weight:700;overflow-wrap:anywhere}.presentation-fields dd{margin:0;overflow-wrap:anywhere;font-size:13px}.notice{margin:10px 0 0;color:var(--nha-text-muted);font-size:12px}.technical-details{margin-top:10px;color:var(--nha-text-muted);font-size:12px}.technical-details summary{cursor:pointer;font-weight:700}.technical-details code{overflow-wrap:anywhere}.label{margin:10px 0 4px;color:var(--nha-text-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.targets{margin:0;padding-left:18px;font-size:13px;overflow-wrap:anywhere}pre{max-height:160px;margin:0;overflow:auto;border-radius:8px;padding:8px;background:var(--nha-surface);font-family:var(--nha-mono);font-size:12px;white-space:pre-wrap;word-break:break-word}.expiry,.deciding,.waiting-for-other{display:flex;align-items:center;gap:6px;margin:10px 0 0;color:var(--nha-text-muted);font-size:12px;font-variant-numeric:tabular-nums}.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:12px}button{min-height:36px;border:1px solid var(--nha-border);border-radius:var(--nha-radius-control);padding:6px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}button:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.55}.reject{color:var(--nha-text);background:transparent}.reject:hover:not(:disabled){background:var(--nha-surface-strong)}.approve{border-color:var(--nha-accent);color:var(--nha-accent-contrast);background:var(--nha-accent)}.approve:hover:not(:disabled){filter:brightness(1.12)}.feedback-toggle{display:inline-flex;min-height:0;margin-top:10px;border:0;border-radius:6px;padding:2px 0;color:var(--nha-text-muted);background:transparent;font-size:12px;font-weight:650;text-decoration:underline;text-underline-offset:2px}.feedback-toggle:hover:not(:disabled){color:var(--nha-text)}.feedback{display:block;margin-top:10px}\n"] }]
|
|
6834
|
+
}, template: "<section class=\"card\" [attr.aria-label]=\"'nh-assistant.approval.title' | translate\">\n <header class=\"header\">\n <nh-assistant-icon [name]=\"actionable() ? 'warning' : succeeded() ? 'check' : 'x'\" />\n <h3>{{ 'nh-assistant.approval.title' | translate }}</h3>\n <span class=\"status\">{{ statusKey() | translate }}</span>\n </header>\n\n @if (staleExplanation(); as explanation) {\n <p class=\"stale-explanation\">{{ explanation }}</p>\n }\n\n @if (approval().presentation; as presentation) {\n <p class=\"tool-name\">{{ presentation.toolDisplayName }}</p>\n <p class=\"summary\">{{ presentation.summary }}</p>\n @if (presentation.fields.length > 0) {\n <dl class=\"presentation-fields\">\n @for (field of presentation.fields; track $index) {\n <div>\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n @if (presentation.notice) {\n <p class=\"notice\">{{ presentation.notice }}</p>\n }\n } @else {\n <p class=\"summary\">{{ 'nh-assistant.approval.fallback-summary' | translate }}</p>\n }\n\n @if (rationale(); as why) {\n <p class=\"rationale\">{{ 'nh-assistant.approval.rationale' | translate: { rationale: why } }}</p>\n }\n\n <details class=\"technical-details\">\n <summary>{{ 'nh-assistant.approval.technical-details' | translate }}</summary>\n <p class=\"label\">{{ 'nh-assistant.approval.tool-id' | translate }}</p>\n <code>{{ approval().toolId }}</code>\n @if (approval().targets.length > 0) {\n <p class=\"label\">{{ 'nh-assistant.approval.targets' | translate }}</p>\n <ul class=\"targets\">\n @for (target of approval().targets; track $index) {\n <li>{{ target }}</li>\n }\n </ul>\n }\n @if (approval().argumentsPreview) {\n <p class=\"label\">{{ 'nh-assistant.approval.arguments' | translate }}</p>\n <pre>{{ approval().argumentsPreview }}</pre>\n }\n </details>\n\n @if (actionable() && !canDecide()) {\n <p class=\"waiting-for-other\" role=\"status\">\n <nh-assistant-icon name=\"users\" />\n {{ waitingKey() | translate: { name: decisionOwner() } }}\n </p>\n } @else if (actionable()) {\n <p class=\"expiry\" aria-live=\"off\">\n <nh-assistant-icon name=\"clock\" />\n {{ 'nh-assistant.approval.expires-in' | translate: { time: countdown() } }}\n </p>\n <div class=\"actions\">\n <button\n class=\"reject\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.reject-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('reject')\">\n {{ 'nh-assistant.approval.reject' | translate }}\n </button>\n <button\n class=\"approve\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'nh-assistant.approval.approve-label' | translate: { summary: presentedSummary() ?? ('nh-assistant.approval.fallback-summary' | translate) }\"\n (click)=\"choose('approve')\">\n {{ 'nh-assistant.approval.approve' | translate }}\n </button>\n </div>\n @if (deciding()) {\n <p class=\"deciding\" role=\"status\">{{ 'nh-assistant.approval.deciding' | translate }}</p>\n }\n } @else if (expired()) {\n <p class=\"expiry\">{{ 'nh-assistant.approval.expired' | translate }}</p>\n }\n\n @if (feedbackAvailable()) {\n @if (!feedbackSaved()) {\n <button\n #feedbackToggle\n class=\"feedback-toggle\"\n type=\"button\"\n [attr.aria-expanded]=\"feedbackOpen()\"\n [attr.aria-controls]=\"feedbackOpen() ? feedbackPanelId : null\"\n (click)=\"toggleFeedback()\">\n {{ 'nh-assistant.approval.give-feedback' | translate }}\n </button>\n }\n @if (feedbackOpen()) {\n <nh-assistant-proposal-feedback\n class=\"feedback\"\n [attr.id]=\"feedbackPanelId\"\n [approvalIds]=\"feedbackIds()\"\n (saved)=\"onFeedbackSaved()\"\n (dismissed)=\"onFeedbackDismissed()\" />\n }\n }\n</section>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:block;--nha-status-color: var(--nha-warning);--nha-status-background: var(--nha-warning-soft)}:host([data-status=approved]){--nha-status-color: var(--nha-success);--nha-status-background: var(--nha-success-soft)}:host([data-status=rejected]),:host([data-status=expired]),:host([data-status=stale]){--nha-status-color: var(--nha-text-muted);--nha-status-background: var(--nha-surface-strong)}.card{border:1px solid var(--nha-status-color);border-radius:var(--nha-radius-control);padding:12px;color:var(--nha-text);background:var(--nha-background)}.header{display:flex;align-items:center;gap:8px;color:var(--nha-status-color)}h3{flex:1;margin:0;color:var(--nha-text);font-size:14px;font-weight:700}.status{border-radius:999px;padding:2px 8px;color:var(--nha-status-color);background:var(--nha-status-background);font-size:11px;font-weight:700}.summary{margin:8px 0 0;font-size:14px;overflow-wrap:anywhere}.tool-name{margin:10px 0 0;font-size:12px;font-weight:700}.presentation-fields{display:grid;gap:6px;margin:10px 0 0}.presentation-fields div{display:grid;grid-template-columns:minmax(90px,.4fr) minmax(0,1fr);gap:8px}.presentation-fields dt{color:var(--nha-text-muted);font-size:12px;font-weight:700;overflow-wrap:anywhere}.presentation-fields dd{margin:0;overflow-wrap:anywhere;font-size:13px}.notice{margin:10px 0 0;color:var(--nha-text-muted);font-size:12px}.stale-explanation{margin:8px 0 0;border-radius:8px;padding:8px 10px;color:var(--nha-text);background:var(--nha-surface-strong);font-size:13px;overflow-wrap:anywhere}.rationale{margin:8px 0 0;color:var(--nha-text-muted);font-size:13px;overflow-wrap:anywhere}.technical-details{margin-top:10px;color:var(--nha-text-muted);font-size:12px}.technical-details summary{cursor:pointer;font-weight:700}.technical-details code{overflow-wrap:anywhere}.label{margin:10px 0 4px;color:var(--nha-text-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.targets{margin:0;padding-left:18px;font-size:13px;overflow-wrap:anywhere}pre{max-height:160px;margin:0;overflow:auto;border-radius:8px;padding:8px;background:var(--nha-surface);font-family:var(--nha-mono);font-size:12px;white-space:pre-wrap;word-break:break-word}.expiry,.deciding,.waiting-for-other{display:flex;align-items:center;gap:6px;margin:10px 0 0;color:var(--nha-text-muted);font-size:12px;font-variant-numeric:tabular-nums}.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:12px}button{min-height:36px;border:1px solid var(--nha-border);border-radius:var(--nha-radius-control);padding:6px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}button:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.55}.reject{color:var(--nha-text);background:transparent}.reject:hover:not(:disabled){background:var(--nha-surface-strong)}.approve{border-color:var(--nha-accent);color:var(--nha-accent-contrast);background:var(--nha-accent)}.approve:hover:not(:disabled){filter:brightness(1.12)}.feedback-toggle{display:inline-flex;min-height:0;margin-top:10px;border:0;border-radius:6px;padding:2px 0;color:var(--nha-text-muted);background:transparent;font-size:12px;font-weight:650;text-decoration:underline;text-underline-offset:2px}.feedback-toggle:hover:not(:disabled){color:var(--nha-text)}.feedback{display:block;margin-top:10px}\n"] }]
|
|
6426
6835
|
}], ctorParameters: () => [], propDecorators: { approval: [{ type: i0.Input, args: [{ isSignal: true, alias: "approval", required: true }] }], deciding: [{ type: i0.Input, args: [{ isSignal: true, alias: "deciding", required: false }] }], canDecide: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDecide", required: false }] }], decisionOwner: [{ type: i0.Input, args: [{ isSignal: true, alias: "decisionOwner", required: false }] }], waitingFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "waitingFor", required: false }] }], canGiveFeedback: [{ type: i0.Input, args: [{ isSignal: true, alias: "canGiveFeedback", required: false }] }], decide: [{ type: i0.Output, args: ["decide"] }], feedbackToggle: [{ type: i0.ViewChild, args: ['feedbackToggle', { isSignal: true }] }] } });
|
|
6427
6836
|
|
|
6428
6837
|
let nextId$2 = 0;
|
|
@@ -6622,6 +7031,10 @@ class NhAssistantThreadComponent {
|
|
|
6622
7031
|
isTrigger(message) {
|
|
6623
7032
|
return message.role === 'user' && message.authorKind === 'trigger';
|
|
6624
7033
|
}
|
|
7034
|
+
/** True for an assistant message the agent's rules wrote without a model. */
|
|
7035
|
+
isRule(message) {
|
|
7036
|
+
return message.role === 'assistant' && message.authorKind === 'rule';
|
|
7037
|
+
}
|
|
6625
7038
|
/** True for a user message written by another person in a shared conversation. */
|
|
6626
7039
|
isOthers(message) {
|
|
6627
7040
|
return message.role === 'user'
|
|
@@ -6662,7 +7075,7 @@ class NhAssistantThreadComponent {
|
|
|
6662
7075
|
}
|
|
6663
7076
|
}
|
|
6664
7077
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NhAssistantThreadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6665
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: NhAssistantThreadComponent, isStandalone: true, selector: "nh-assistant-thread", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: true, transformFunction: null }, streaming: { classPropertyName: "streaming", publicName: "streaming", isSignal: true, isRequired: false, transformFunction: null }, deciding: { classPropertyName: "deciding", publicName: "deciding", isSignal: true, isRequired: false, transformFunction: null }, markdown: { classPropertyName: "markdown", publicName: "markdown", isSignal: true, isRequired: false, transformFunction: null }, members: { classPropertyName: "members", publicName: "members", isSignal: true, isRequired: false, transformFunction: null }, currentActorId: { classPropertyName: "currentActorId", publicName: "currentActorId", isSignal: true, isRequired: false, transformFunction: null }, canDecide: { classPropertyName: "canDecide", publicName: "canDecide", isSignal: true, isRequired: false, transformFunction: null }, decisionOwner: { classPropertyName: "decisionOwner", publicName: "decisionOwner", isSignal: true, isRequired: false, transformFunction: null }, approvalRights: { classPropertyName: "approvalRights", publicName: "approvalRights", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { approvalDecision: "approvalDecision", approvalChoice: "approvalChoice" }, viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"log\" role=\"log\" aria-live=\"polite\" [attr.aria-label]=\"'nh-assistant.thread.label' | translate\" [attr.aria-busy]=\"streaming()\">\n @if (virtual()) {\n <cdk-virtual-scroll-viewport class=\"scroller\" itemSize=\"120\" minBufferPx=\"1200\" maxBufferPx=\"2400\">\n <div class=\"row\" *cdkVirtualFor=\"let message of messages(); trackBy: trackMessage\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"scroller\" #scroller tabindex=\"0\">\n @for (message of messages(); track message.id) {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n }\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </div>\n }\n</div>\n\n<ng-template #messageTemplate let-message>\n <article\n class=\"message\"\n [attr.data-role]=\"message.role\"\n [attr.data-others]=\"isOthers(message) ? 'true' : null\"\n [attr.data-author]=\"isTrigger(message) ? 'trigger' : null\">\n @if (isTrigger(message)) {\n <p class=\"author\">{{ 'nh-assistant.thread.trigger' | translate }}</p>\n } @else if (isOthers(message)) {\n <p class=\"author\">{{ authorName(message) ?? ('nh-assistant.thread.participant' | translate) }}</p>\n } @else {\n <p class=\"author\">{{ 'nh-assistant.thread.' + (message.role === 'user' ? 'you' : message.role) | translate }}</p>\n }\n @for (group of message.parts | nhAssistantPartGroups; track group.key) {\n @switch (group.kind) {\n @case ('text') {\n @if (message.role === 'assistant' && markdown()) {\n <div class=\"bubble markdown\" [innerHTML]=\"group.part.text | nhAssistantMarkdown\"></div>\n } @else {\n <div class=\"bubble plain\">{{ group.part.text }}</div>\n }\n }\n @case ('tools') {\n <nh-assistant-tool-call-group class=\"part\" [calls]=\"group.calls\" />\n }\n @case ('approval') {\n <nh-assistant-approval-card\n class=\"part\"\n [approval]=\"group.part\"\n [deciding]=\"deciding()\"\n [canDecide]=\"rightFor(group.part).canDecide\"\n [decisionOwner]=\"rightFor(group.part).decisionOwner\"\n [waitingFor]=\"rightFor(group.part).waitingFor\"\n [canGiveFeedback]=\"rightFor(group.part).canGiveFeedback === true\"\n (decide)=\"choose(group.part, $event)\" />\n }\n }\n }\n </article>\n</ng-template>\n\n<ng-template #workingTemplate>\n <p class=\"working\" role=\"status\">\n <span class=\"dots\" aria-hidden=\"true\"><span></span><span></span><span></span></span>\n {{ 'nh-assistant.thread.working' | translate }}\n @if (elapsedSeconds() > 0) {\n <span class=\"elapsed\">{{ 'nh-assistant.thread.elapsed' | translate: { seconds: elapsedSeconds() } }}</span>\n }\n </p>\n</ng-template>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:flex;flex-direction:column;min-height:0;color:var(--nha-text)}.log{display:flex;flex:1;flex-direction:column;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;outline:none}.scroller:focus-visible{box-shadow:inset 0 0 0 2px var(--nha-focus)}cdk-virtual-scroll-viewport.scroller{height:100%}.row+.row{margin-top:20px}.message{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}.message[data-role=user]{align-items:flex-end}.author{margin:0;color:var(--nha-text-muted);font-size:11px;font-weight:600}.bubble{max-width:100%;border-radius:var(--nha-radius-control);padding:8px 12px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.plain{white-space:pre-wrap}.message[data-role=user] .bubble{max-width:88%;color:var(--nha-user-text);background:var(--nha-user-bubble)}.message[data-others=true]{align-items:flex-start}.message[data-others=true] .bubble{color:var(--nha-text);background:var(--nha-surface-strong)}.message[data-author=trigger]{align-items:stretch}.message[data-author=trigger] .bubble{max-width:none;color:var(--nha-text-muted);background:transparent;border:1px dashed var(--nha-border)}.message[data-role=assistant] .bubble,.message[data-role=tool] .bubble{padding-inline:0;background:transparent}.part{width:100%}:host ::ng-deep .markdown :first-child{margin-top:0}:host ::ng-deep .markdown :last-child{margin-bottom:0}:host ::ng-deep .markdown p,:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol,:host ::ng-deep .markdown pre,:host ::ng-deep .markdown blockquote,:host ::ng-deep .markdown table{margin:0 0 8px}:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol{padding-left:20px}:host ::ng-deep .markdown h1,:host ::ng-deep .markdown h2,:host ::ng-deep .markdown h3,:host ::ng-deep .markdown h4,:host ::ng-deep .markdown h5,:host ::ng-deep .markdown h6{margin:10px 0 6px;font-size:15px;line-height:1.3}:host ::ng-deep .markdown a{color:var(--nha-highlight);text-decoration:underline}:host ::ng-deep .markdown a:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}:host ::ng-deep .markdown code{border-radius:6px;padding:1px 4px;background:var(--nha-surface-strong);font-family:var(--nha-mono);font-size:12.5px}:host ::ng-deep .markdown pre{overflow-x:auto;border-radius:8px;padding:8px;background:var(--nha-surface-strong)}:host ::ng-deep .markdown pre code{padding:0;background:none}:host ::ng-deep .markdown blockquote{border-left:3px solid var(--nha-border);padding-left:10px;color:var(--nha-text-muted)}:host ::ng-deep .markdown table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:13px}:host ::ng-deep .markdown th,:host ::ng-deep .markdown td{border:1px solid var(--nha-border);padding:4px 8px;text-align:left}.working{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:var(--nha-text-muted);font-size:13px}.elapsed{font-variant-numeric:tabular-nums}.dots{display:inline-flex;gap:3px}.dots span{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.6}@media(prefers-reduced-motion:no-preference){.dots span{animation:nha-bounce 1s ease-in-out infinite}.dots span:nth-child(2){animation-delay:.15s}.dots span:nth-child(3){animation-delay:.3s}}@keyframes nha-bounce{0%,80%,to{transform:translateY(0);opacity:.35}40%{transform:translateY(-3px);opacity:1}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: NhAssistantToolCallGroupComponent, selector: "nh-assistant-tool-call-group", inputs: ["calls"] }, { kind: "component", type: NhAssistantApprovalCardComponent, selector: "nh-assistant-approval-card", inputs: ["approval", "deciding", "canDecide", "decisionOwner", "waitingFor", "canGiveFeedback"], outputs: ["decide"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: NhAssistantMarkdownPipe, name: "nhAssistantMarkdown" }, { kind: "pipe", type: NhAssistantPartGroupsPipe, name: "nhAssistantPartGroups" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7078
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: NhAssistantThreadComponent, isStandalone: true, selector: "nh-assistant-thread", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: true, transformFunction: null }, streaming: { classPropertyName: "streaming", publicName: "streaming", isSignal: true, isRequired: false, transformFunction: null }, deciding: { classPropertyName: "deciding", publicName: "deciding", isSignal: true, isRequired: false, transformFunction: null }, markdown: { classPropertyName: "markdown", publicName: "markdown", isSignal: true, isRequired: false, transformFunction: null }, members: { classPropertyName: "members", publicName: "members", isSignal: true, isRequired: false, transformFunction: null }, currentActorId: { classPropertyName: "currentActorId", publicName: "currentActorId", isSignal: true, isRequired: false, transformFunction: null }, canDecide: { classPropertyName: "canDecide", publicName: "canDecide", isSignal: true, isRequired: false, transformFunction: null }, decisionOwner: { classPropertyName: "decisionOwner", publicName: "decisionOwner", isSignal: true, isRequired: false, transformFunction: null }, approvalRights: { classPropertyName: "approvalRights", publicName: "approvalRights", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { approvalDecision: "approvalDecision", approvalChoice: "approvalChoice" }, viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"log\" role=\"log\" aria-live=\"polite\" [attr.aria-label]=\"'nh-assistant.thread.label' | translate\" [attr.aria-busy]=\"streaming()\">\n @if (virtual()) {\n <cdk-virtual-scroll-viewport class=\"scroller\" itemSize=\"120\" minBufferPx=\"1200\" maxBufferPx=\"2400\">\n <div class=\"row\" *cdkVirtualFor=\"let message of messages(); trackBy: trackMessage\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"scroller\" #scroller tabindex=\"0\">\n @for (message of messages(); track message.id) {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n }\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </div>\n }\n</div>\n\n<ng-template #messageTemplate let-message>\n <article\n class=\"message\"\n [attr.data-role]=\"message.role\"\n [attr.data-others]=\"isOthers(message) ? 'true' : null\"\n [attr.data-author]=\"isTrigger(message) ? 'trigger' : isRule(message) ? 'rule' : null\">\n @if (isTrigger(message)) {\n <p class=\"author\">{{ 'nh-assistant.thread.trigger' | translate }}</p>\n } @else if (isRule(message)) {\n <p class=\"author\">{{ 'nh-assistant.thread.rule' | translate }}</p>\n } @else if (isOthers(message)) {\n <p class=\"author\">{{ authorName(message) ?? ('nh-assistant.thread.participant' | translate) }}</p>\n } @else {\n <p class=\"author\">{{ 'nh-assistant.thread.' + (message.role === 'user' ? 'you' : message.role) | translate }}</p>\n }\n @for (group of message.parts | nhAssistantPartGroups; track group.key) {\n @switch (group.kind) {\n @case ('text') {\n @if (message.role === 'assistant' && markdown()) {\n <div class=\"bubble markdown\" [innerHTML]=\"group.part.text | nhAssistantMarkdown\"></div>\n } @else {\n <div class=\"bubble plain\">{{ group.part.text }}</div>\n }\n }\n @case ('tools') {\n <nh-assistant-tool-call-group class=\"part\" [calls]=\"group.calls\" />\n }\n @case ('approval') {\n <nh-assistant-approval-card\n class=\"part\"\n [approval]=\"group.part\"\n [deciding]=\"deciding()\"\n [canDecide]=\"rightFor(group.part).canDecide\"\n [decisionOwner]=\"rightFor(group.part).decisionOwner\"\n [waitingFor]=\"rightFor(group.part).waitingFor\"\n [canGiveFeedback]=\"rightFor(group.part).canGiveFeedback === true\"\n (decide)=\"choose(group.part, $event)\" />\n }\n }\n }\n </article>\n</ng-template>\n\n<ng-template #workingTemplate>\n <p class=\"working\" role=\"status\">\n <span class=\"dots\" aria-hidden=\"true\"><span></span><span></span><span></span></span>\n {{ 'nh-assistant.thread.working' | translate }}\n @if (elapsedSeconds() > 0) {\n <span class=\"elapsed\">{{ 'nh-assistant.thread.elapsed' | translate: { seconds: elapsedSeconds() } }}</span>\n }\n </p>\n</ng-template>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:flex;flex-direction:column;min-height:0;color:var(--nha-text)}.log{display:flex;flex:1;flex-direction:column;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;outline:none}.scroller:focus-visible{box-shadow:inset 0 0 0 2px var(--nha-focus)}cdk-virtual-scroll-viewport.scroller{height:100%}.row+.row{margin-top:20px}.message{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}.message[data-role=user]{align-items:flex-end}.author{margin:0;color:var(--nha-text-muted);font-size:11px;font-weight:600}.bubble{max-width:100%;border-radius:var(--nha-radius-control);padding:8px 12px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.plain{white-space:pre-wrap}.message[data-role=user] .bubble{max-width:88%;color:var(--nha-user-text);background:var(--nha-user-bubble)}.message[data-others=true]{align-items:flex-start}.message[data-others=true] .bubble{color:var(--nha-text);background:var(--nha-surface-strong)}.message[data-author=trigger]{align-items:stretch}.message[data-author=trigger] .bubble{max-width:none;color:var(--nha-text-muted);background:transparent;border:1px dashed var(--nha-border)}.message[data-role=assistant] .bubble,.message[data-role=tool] .bubble{padding-inline:0;background:transparent}.part{width:100%}:host ::ng-deep .markdown :first-child{margin-top:0}:host ::ng-deep .markdown :last-child{margin-bottom:0}:host ::ng-deep .markdown p,:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol,:host ::ng-deep .markdown pre,:host ::ng-deep .markdown blockquote,:host ::ng-deep .markdown table{margin:0 0 8px}:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol{padding-left:20px}:host ::ng-deep .markdown h1,:host ::ng-deep .markdown h2,:host ::ng-deep .markdown h3,:host ::ng-deep .markdown h4,:host ::ng-deep .markdown h5,:host ::ng-deep .markdown h6{margin:10px 0 6px;font-size:15px;line-height:1.3}:host ::ng-deep .markdown a{color:var(--nha-highlight);text-decoration:underline}:host ::ng-deep .markdown a:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}:host ::ng-deep .markdown code{border-radius:6px;padding:1px 4px;background:var(--nha-surface-strong);font-family:var(--nha-mono);font-size:12.5px}:host ::ng-deep .markdown pre{overflow-x:auto;border-radius:8px;padding:8px;background:var(--nha-surface-strong)}:host ::ng-deep .markdown pre code{padding:0;background:none}:host ::ng-deep .markdown blockquote{border-left:3px solid var(--nha-border);padding-left:10px;color:var(--nha-text-muted)}:host ::ng-deep .markdown table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:13px}:host ::ng-deep .markdown th,:host ::ng-deep .markdown td{border:1px solid var(--nha-border);padding:4px 8px;text-align:left}.working{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:var(--nha-text-muted);font-size:13px}.elapsed{font-variant-numeric:tabular-nums}.dots{display:inline-flex;gap:3px}.dots span{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.6}@media(prefers-reduced-motion:no-preference){.dots span{animation:nha-bounce 1s ease-in-out infinite}.dots span:nth-child(2){animation-delay:.15s}.dots span:nth-child(3){animation-delay:.3s}}@keyframes nha-bounce{0%,80%,to{transform:translateY(0);opacity:.35}40%{transform:translateY(-3px);opacity:1}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: NhAssistantToolCallGroupComponent, selector: "nh-assistant-tool-call-group", inputs: ["calls"] }, { kind: "component", type: NhAssistantApprovalCardComponent, selector: "nh-assistant-approval-card", inputs: ["approval", "deciding", "canDecide", "decisionOwner", "waitingFor", "canGiveFeedback"], outputs: ["decide"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: NhAssistantMarkdownPipe, name: "nhAssistantMarkdown" }, { kind: "pipe", type: NhAssistantPartGroupsPipe, name: "nhAssistantPartGroups" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6666
7079
|
}
|
|
6667
7080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NhAssistantThreadComponent, decorators: [{
|
|
6668
7081
|
type: Component,
|
|
@@ -6674,7 +7087,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
6674
7087
|
NhAssistantPartGroupsPipe,
|
|
6675
7088
|
NhAssistantToolCallGroupComponent,
|
|
6676
7089
|
NhAssistantApprovalCardComponent
|
|
6677
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"log\" role=\"log\" aria-live=\"polite\" [attr.aria-label]=\"'nh-assistant.thread.label' | translate\" [attr.aria-busy]=\"streaming()\">\n @if (virtual()) {\n <cdk-virtual-scroll-viewport class=\"scroller\" itemSize=\"120\" minBufferPx=\"1200\" maxBufferPx=\"2400\">\n <div class=\"row\" *cdkVirtualFor=\"let message of messages(); trackBy: trackMessage\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"scroller\" #scroller tabindex=\"0\">\n @for (message of messages(); track message.id) {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n }\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </div>\n }\n</div>\n\n<ng-template #messageTemplate let-message>\n <article\n class=\"message\"\n [attr.data-role]=\"message.role\"\n [attr.data-others]=\"isOthers(message) ? 'true' : null\"\n [attr.data-author]=\"isTrigger(message) ? 'trigger' : null\">\n @if (isTrigger(message)) {\n <p class=\"author\">{{ 'nh-assistant.thread.trigger' | translate }}</p>\n } @else if (isOthers(message)) {\n <p class=\"author\">{{ authorName(message) ?? ('nh-assistant.thread.participant' | translate) }}</p>\n } @else {\n <p class=\"author\">{{ 'nh-assistant.thread.' + (message.role === 'user' ? 'you' : message.role) | translate }}</p>\n }\n @for (group of message.parts | nhAssistantPartGroups; track group.key) {\n @switch (group.kind) {\n @case ('text') {\n @if (message.role === 'assistant' && markdown()) {\n <div class=\"bubble markdown\" [innerHTML]=\"group.part.text | nhAssistantMarkdown\"></div>\n } @else {\n <div class=\"bubble plain\">{{ group.part.text }}</div>\n }\n }\n @case ('tools') {\n <nh-assistant-tool-call-group class=\"part\" [calls]=\"group.calls\" />\n }\n @case ('approval') {\n <nh-assistant-approval-card\n class=\"part\"\n [approval]=\"group.part\"\n [deciding]=\"deciding()\"\n [canDecide]=\"rightFor(group.part).canDecide\"\n [decisionOwner]=\"rightFor(group.part).decisionOwner\"\n [waitingFor]=\"rightFor(group.part).waitingFor\"\n [canGiveFeedback]=\"rightFor(group.part).canGiveFeedback === true\"\n (decide)=\"choose(group.part, $event)\" />\n }\n }\n }\n </article>\n</ng-template>\n\n<ng-template #workingTemplate>\n <p class=\"working\" role=\"status\">\n <span class=\"dots\" aria-hidden=\"true\"><span></span><span></span><span></span></span>\n {{ 'nh-assistant.thread.working' | translate }}\n @if (elapsedSeconds() > 0) {\n <span class=\"elapsed\">{{ 'nh-assistant.thread.elapsed' | translate: { seconds: elapsedSeconds() } }}</span>\n }\n </p>\n</ng-template>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:flex;flex-direction:column;min-height:0;color:var(--nha-text)}.log{display:flex;flex:1;flex-direction:column;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;outline:none}.scroller:focus-visible{box-shadow:inset 0 0 0 2px var(--nha-focus)}cdk-virtual-scroll-viewport.scroller{height:100%}.row+.row{margin-top:20px}.message{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}.message[data-role=user]{align-items:flex-end}.author{margin:0;color:var(--nha-text-muted);font-size:11px;font-weight:600}.bubble{max-width:100%;border-radius:var(--nha-radius-control);padding:8px 12px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.plain{white-space:pre-wrap}.message[data-role=user] .bubble{max-width:88%;color:var(--nha-user-text);background:var(--nha-user-bubble)}.message[data-others=true]{align-items:flex-start}.message[data-others=true] .bubble{color:var(--nha-text);background:var(--nha-surface-strong)}.message[data-author=trigger]{align-items:stretch}.message[data-author=trigger] .bubble{max-width:none;color:var(--nha-text-muted);background:transparent;border:1px dashed var(--nha-border)}.message[data-role=assistant] .bubble,.message[data-role=tool] .bubble{padding-inline:0;background:transparent}.part{width:100%}:host ::ng-deep .markdown :first-child{margin-top:0}:host ::ng-deep .markdown :last-child{margin-bottom:0}:host ::ng-deep .markdown p,:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol,:host ::ng-deep .markdown pre,:host ::ng-deep .markdown blockquote,:host ::ng-deep .markdown table{margin:0 0 8px}:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol{padding-left:20px}:host ::ng-deep .markdown h1,:host ::ng-deep .markdown h2,:host ::ng-deep .markdown h3,:host ::ng-deep .markdown h4,:host ::ng-deep .markdown h5,:host ::ng-deep .markdown h6{margin:10px 0 6px;font-size:15px;line-height:1.3}:host ::ng-deep .markdown a{color:var(--nha-highlight);text-decoration:underline}:host ::ng-deep .markdown a:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}:host ::ng-deep .markdown code{border-radius:6px;padding:1px 4px;background:var(--nha-surface-strong);font-family:var(--nha-mono);font-size:12.5px}:host ::ng-deep .markdown pre{overflow-x:auto;border-radius:8px;padding:8px;background:var(--nha-surface-strong)}:host ::ng-deep .markdown pre code{padding:0;background:none}:host ::ng-deep .markdown blockquote{border-left:3px solid var(--nha-border);padding-left:10px;color:var(--nha-text-muted)}:host ::ng-deep .markdown table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:13px}:host ::ng-deep .markdown th,:host ::ng-deep .markdown td{border:1px solid var(--nha-border);padding:4px 8px;text-align:left}.working{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:var(--nha-text-muted);font-size:13px}.elapsed{font-variant-numeric:tabular-nums}.dots{display:inline-flex;gap:3px}.dots span{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.6}@media(prefers-reduced-motion:no-preference){.dots span{animation:nha-bounce 1s ease-in-out infinite}.dots span:nth-child(2){animation-delay:.15s}.dots span:nth-child(3){animation-delay:.3s}}@keyframes nha-bounce{0%,80%,to{transform:translateY(0);opacity:.35}40%{transform:translateY(-3px);opacity:1}}\n"] }]
|
|
7090
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"log\" role=\"log\" aria-live=\"polite\" [attr.aria-label]=\"'nh-assistant.thread.label' | translate\" [attr.aria-busy]=\"streaming()\">\n @if (virtual()) {\n <cdk-virtual-scroll-viewport class=\"scroller\" itemSize=\"120\" minBufferPx=\"1200\" maxBufferPx=\"2400\">\n <div class=\"row\" *cdkVirtualFor=\"let message of messages(); trackBy: trackMessage\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </cdk-virtual-scroll-viewport>\n } @else {\n <div class=\"scroller\" #scroller tabindex=\"0\">\n @for (message of messages(); track message.id) {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"messageTemplate\" [ngTemplateOutletContext]=\"{ $implicit: message }\" />\n </div>\n }\n @if (working()) {\n <ng-container [ngTemplateOutlet]=\"workingTemplate\" />\n }\n </div>\n }\n</div>\n\n<ng-template #messageTemplate let-message>\n <article\n class=\"message\"\n [attr.data-role]=\"message.role\"\n [attr.data-others]=\"isOthers(message) ? 'true' : null\"\n [attr.data-author]=\"isTrigger(message) ? 'trigger' : isRule(message) ? 'rule' : null\">\n @if (isTrigger(message)) {\n <p class=\"author\">{{ 'nh-assistant.thread.trigger' | translate }}</p>\n } @else if (isRule(message)) {\n <p class=\"author\">{{ 'nh-assistant.thread.rule' | translate }}</p>\n } @else if (isOthers(message)) {\n <p class=\"author\">{{ authorName(message) ?? ('nh-assistant.thread.participant' | translate) }}</p>\n } @else {\n <p class=\"author\">{{ 'nh-assistant.thread.' + (message.role === 'user' ? 'you' : message.role) | translate }}</p>\n }\n @for (group of message.parts | nhAssistantPartGroups; track group.key) {\n @switch (group.kind) {\n @case ('text') {\n @if (message.role === 'assistant' && markdown()) {\n <div class=\"bubble markdown\" [innerHTML]=\"group.part.text | nhAssistantMarkdown\"></div>\n } @else {\n <div class=\"bubble plain\">{{ group.part.text }}</div>\n }\n }\n @case ('tools') {\n <nh-assistant-tool-call-group class=\"part\" [calls]=\"group.calls\" />\n }\n @case ('approval') {\n <nh-assistant-approval-card\n class=\"part\"\n [approval]=\"group.part\"\n [deciding]=\"deciding()\"\n [canDecide]=\"rightFor(group.part).canDecide\"\n [decisionOwner]=\"rightFor(group.part).decisionOwner\"\n [waitingFor]=\"rightFor(group.part).waitingFor\"\n [canGiveFeedback]=\"rightFor(group.part).canGiveFeedback === true\"\n (decide)=\"choose(group.part, $event)\" />\n }\n }\n }\n </article>\n</ng-template>\n\n<ng-template #workingTemplate>\n <p class=\"working\" role=\"status\">\n <span class=\"dots\" aria-hidden=\"true\"><span></span><span></span><span></span></span>\n {{ 'nh-assistant.thread.working' | translate }}\n @if (elapsedSeconds() > 0) {\n <span class=\"elapsed\">{{ 'nh-assistant.thread.elapsed' | translate: { seconds: elapsedSeconds() } }}</span>\n }\n </p>\n</ng-template>\n", styles: [":host{--nha-font: var(--nh-assistant-font, inherit);--nha-background: var(--nh-assistant-background, #ffffff);--nha-surface: var(--nh-assistant-surface, #f5f7fb);--nha-surface-strong: var(--nh-assistant-surface-strong, #eceff6);--nha-text: var(--nh-assistant-text, #080c1d);--nha-text-muted: var(--nh-assistant-text-muted, #5b6482);--nha-border: var(--nh-assistant-border, #dce0ec);--nha-accent: var(--nh-assistant-accent, #022962);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #c84f00);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #247d4e);--nha-success-soft: var(--nh-assistant-success-soft, #e6f5ec);--nha-warning: var(--nh-assistant-warning, #8a5a00);--nha-warning-soft: var(--nh-assistant-warning-soft, #fff3d9);--nha-danger: var(--nh-assistant-danger, #b92e52);--nha-danger-soft: var(--nh-assistant-danger-soft, #ffe9ef);--nha-focus: var(--nh-assistant-focus, #ff6700);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(2 41 98 / .16));--nha-radius: var(--nh-assistant-radius, 16px);--nha-radius-control: var(--nh-assistant-radius-control, 12px);--nha-mono: var(--nh-assistant-font-mono, ui-monospace, \"Cascadia Code\", Consolas, monospace)}@media(prefers-color-scheme:dark){:host{--nha-background: var(--nh-assistant-background, #0b0e22);--nha-surface: var(--nh-assistant-surface, #11152d);--nha-surface-strong: var(--nh-assistant-surface-strong, #181d3b);--nha-text: var(--nh-assistant-text, #ffffff);--nha-text-muted: var(--nh-assistant-text-muted, #b8bed8);--nha-border: var(--nh-assistant-border, #2b3155);--nha-accent: var(--nh-assistant-accent, #0f4087);--nha-accent-contrast: var(--nh-assistant-accent-contrast, #ffffff);--nha-highlight: var(--nh-assistant-highlight, #ff6700);--nha-user-bubble: var(--nh-assistant-user-bubble, #022962);--nha-user-text: var(--nh-assistant-user-text, #ffffff);--nha-success: var(--nh-assistant-success, #67c58f);--nha-success-soft: var(--nh-assistant-success-soft, #102d24);--nha-warning: var(--nh-assistant-warning, #ffbf5b);--nha-warning-soft: var(--nh-assistant-warning-soft, #342818);--nha-danger: var(--nh-assistant-danger, #ff6d8a);--nha-danger-soft: var(--nh-assistant-danger-soft, #351b2a);--nha-shadow: var(--nh-assistant-shadow, 0 16px 36px rgb(0 0 0 / .32))}}:host{display:flex;flex-direction:column;min-height:0;color:var(--nha-text)}.log{display:flex;flex:1;flex-direction:column;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;outline:none}.scroller:focus-visible{box-shadow:inset 0 0 0 2px var(--nha-focus)}cdk-virtual-scroll-viewport.scroller{height:100%}.row+.row{margin-top:20px}.message{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}.message[data-role=user]{align-items:flex-end}.author{margin:0;color:var(--nha-text-muted);font-size:11px;font-weight:600}.bubble{max-width:100%;border-radius:var(--nha-radius-control);padding:8px 12px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.plain{white-space:pre-wrap}.message[data-role=user] .bubble{max-width:88%;color:var(--nha-user-text);background:var(--nha-user-bubble)}.message[data-others=true]{align-items:flex-start}.message[data-others=true] .bubble{color:var(--nha-text);background:var(--nha-surface-strong)}.message[data-author=trigger]{align-items:stretch}.message[data-author=trigger] .bubble{max-width:none;color:var(--nha-text-muted);background:transparent;border:1px dashed var(--nha-border)}.message[data-role=assistant] .bubble,.message[data-role=tool] .bubble{padding-inline:0;background:transparent}.part{width:100%}:host ::ng-deep .markdown :first-child{margin-top:0}:host ::ng-deep .markdown :last-child{margin-bottom:0}:host ::ng-deep .markdown p,:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol,:host ::ng-deep .markdown pre,:host ::ng-deep .markdown blockquote,:host ::ng-deep .markdown table{margin:0 0 8px}:host ::ng-deep .markdown ul,:host ::ng-deep .markdown ol{padding-left:20px}:host ::ng-deep .markdown h1,:host ::ng-deep .markdown h2,:host ::ng-deep .markdown h3,:host ::ng-deep .markdown h4,:host ::ng-deep .markdown h5,:host ::ng-deep .markdown h6{margin:10px 0 6px;font-size:15px;line-height:1.3}:host ::ng-deep .markdown a{color:var(--nha-highlight);text-decoration:underline}:host ::ng-deep .markdown a:focus-visible{outline:3px solid color-mix(in srgb,var(--nha-focus) 80%,transparent);outline-offset:2px}:host ::ng-deep .markdown code{border-radius:6px;padding:1px 4px;background:var(--nha-surface-strong);font-family:var(--nha-mono);font-size:12.5px}:host ::ng-deep .markdown pre{overflow-x:auto;border-radius:8px;padding:8px;background:var(--nha-surface-strong)}:host ::ng-deep .markdown pre code{padding:0;background:none}:host ::ng-deep .markdown blockquote{border-left:3px solid var(--nha-border);padding-left:10px;color:var(--nha-text-muted)}:host ::ng-deep .markdown table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:13px}:host ::ng-deep .markdown th,:host ::ng-deep .markdown td{border:1px solid var(--nha-border);padding:4px 8px;text-align:left}.working{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:var(--nha-text-muted);font-size:13px}.elapsed{font-variant-numeric:tabular-nums}.dots{display:inline-flex;gap:3px}.dots span{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.6}@media(prefers-reduced-motion:no-preference){.dots span{animation:nha-bounce 1s ease-in-out infinite}.dots span:nth-child(2){animation-delay:.15s}.dots span:nth-child(3){animation-delay:.3s}}@keyframes nha-bounce{0%,80%,to{transform:translateY(0);opacity:.35}40%{transform:translateY(-3px);opacity:1}}\n"] }]
|
|
6678
7091
|
}], ctorParameters: () => [], propDecorators: { messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: true }] }], streaming: [{ type: i0.Input, args: [{ isSignal: true, alias: "streaming", required: false }] }], deciding: [{ type: i0.Input, args: [{ isSignal: true, alias: "deciding", required: false }] }], markdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "markdown", required: false }] }], members: [{ type: i0.Input, args: [{ isSignal: true, alias: "members", required: false }] }], currentActorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentActorId", required: false }] }], canDecide: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDecide", required: false }] }], decisionOwner: [{ type: i0.Input, args: [{ isSignal: true, alias: "decisionOwner", required: false }] }], approvalRights: [{ type: i0.Input, args: [{ isSignal: true, alias: "approvalRights", required: false }] }], approvalDecision: [{ type: i0.Output, args: ["approvalDecision"] }], approvalChoice: [{ type: i0.Output, args: ["approvalChoice"] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
|
|
6679
7092
|
|
|
6680
7093
|
let nextId = 0;
|
|
@@ -7011,5 +7424,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
7011
7424
|
* Generated bundle index. Do not edit.
|
|
7012
7425
|
*/
|
|
7013
7426
|
|
|
7014
|
-
export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, NH_ASSISTANT_FEEDBACK_CATEGORIES, NH_ASSISTANT_FEEDBACK_GROUPS, NH_ASSISTANT_FETCH, NH_ASSISTANT_ICONS, NH_ASSISTANT_JOIN_FRAGMENT, NH_ASSISTANT_MAX_BULK_FEEDBACK, NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS, NH_ASSISTANT_MAX_FEEDBACK_TEXT, NH_ASSISTANT_MAX_SUBJECT_SUMMARY, NH_ASSISTANT_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConversationListComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantShareLink, normalizeNhAssistantClientContext, provideNhAssistant, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, toNhAssistantError as ɵtoNhAssistantError };
|
|
7427
|
+
export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, NH_ASSISTANT_FEEDBACK_CATEGORIES, NH_ASSISTANT_FEEDBACK_GROUPS, NH_ASSISTANT_FETCH, NH_ASSISTANT_ICONS, NH_ASSISTANT_JOIN_FRAGMENT, NH_ASSISTANT_MAX_BULK_FEEDBACK, NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS, NH_ASSISTANT_MAX_FEEDBACK_TEXT, NH_ASSISTANT_MAX_PROPOSAL_LOOKUP, NH_ASSISTANT_MAX_SUBJECT_SUMMARY, NH_ASSISTANT_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConversationListComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantShareLink, normalizeNhAssistantClientContext, provideNhAssistant, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, toNhAssistantError as ɵtoNhAssistantError };
|
|
7015
7428
|
//# sourceMappingURL=newheap-platform-ai-chat.mjs.map
|