@alexkroman1/aai-cli 0.12.2 → 0.13.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/README.md +69 -0
- package/bin.mjs +58 -0
- package/dist/_agent-BopNO5Bq.mjs +152 -0
- package/dist/_agent.d.ts +83 -0
- package/dist/_api-client.d.ts +92 -0
- package/dist/_artifacts-BJOYGQPp.mjs +21 -0
- package/dist/_artifacts.d.ts +16 -0
- package/dist/_build-target-C08aM-Es.mjs +1119 -0
- package/dist/_build-target.d.ts +276 -0
- package/dist/_bundler-CgBw5Bcu.mjs +102 -0
- package/dist/_bundler.d.ts +60 -0
- package/dist/_cli-common.d.ts +173 -0
- package/dist/_client-plugins.d.ts +57 -0
- package/dist/_config-mq1I5Cva.mjs +263 -0
- package/dist/_config.d.ts +122 -0
- package/dist/_console-audio.d.ts +17 -0
- package/dist/_console-session.d.ts +70 -0
- package/dist/_default-html.d.ts +33 -0
- package/dist/_deno-output.d.ts +23 -0
- package/dist/_deno-target.d.ts +74 -0
- package/dist/_deploy.d.ts +22 -0
- package/dist/_dev-agent-env.d.ts +27 -0
- package/dist/_dev-env-D9Uy5wNt.mjs +89 -0
- package/dist/_dev-env.d.ts +77 -0
- package/dist/_dev-restart.d.ts +64 -0
- package/dist/_dev-server-BNq5OnUJ.mjs +737 -0
- package/dist/_dev-server.d.ts +89 -0
- package/dist/_dev-session-ticket.d.ts +63 -0
- package/dist/_dev-source.d.ts +55 -0
- package/dist/_dev-tunnel.d.ts +90 -0
- package/dist/_dev-typecheck.d.ts +38 -0
- package/dist/_dev-vite-config.d.ts +100 -0
- package/dist/_dev-watch.d.ts +35 -0
- package/dist/_dotenv-file.d.ts +45 -0
- package/dist/_e2e-test-utils.d.ts +120 -0
- package/dist/_fault-mode.d.ts +194 -0
- package/dist/_help.d.ts +31 -0
- package/dist/_init.d.ts +66 -0
- package/dist/_mock-api.d.ts +22 -0
- package/dist/_mock-registry.d.ts +17 -0
- package/dist/_modal-app.d.ts +77 -0
- package/dist/_modal-output.d.ts +31 -0
- package/dist/_modal-target.d.ts +69 -0
- package/dist/_output-DBP9Op_d.mjs +120 -0
- package/dist/_output.d.ts +74 -0
- package/dist/_preflight-Bv6Ct4ss.mjs +149 -0
- package/dist/_preflight.d.ts +170 -0
- package/dist/_resource-commands.d.ts +22 -0
- package/dist/_run-code-deno-C0AtfHeH.mjs +268 -0
- package/dist/_run-code-deno.d.ts +130 -0
- package/dist/_server-common-CVXIeWrY.mjs +114 -0
- package/dist/_server-common.d.ts +75 -0
- package/dist/_slug-api-DJuwYZ6T.mjs +68 -0
- package/dist/_slug-api.d.ts +61 -0
- package/dist/_stop-server.d.ts +17 -0
- package/dist/_studio-BH05zugt.mjs +251 -0
- package/dist/_studio-commands.d.ts +73 -0
- package/dist/_studio.d.ts +80 -0
- package/dist/_target-bundle.d.ts +139 -0
- package/dist/_target-drain.d.ts +44 -0
- package/dist/_target-entry.d.ts +81 -0
- package/dist/_target-output.d.ts +63 -0
- package/dist/_templates-Bv-rd0SO.mjs +135 -0
- package/dist/_templates.d.ts +82 -0
- package/dist/_typecheck-gate-CcX2gLJZ.mjs +19 -0
- package/dist/_typecheck-gate.d.ts +11 -0
- package/dist/_ui-Coe0zwmm.mjs +102 -0
- package/dist/_ui.d.ts +90 -0
- package/dist/_utils-BVLdBvdT.mjs +186 -0
- package/dist/_utils.d.ts +126 -0
- package/dist/_vercel-output.d.ts +48 -0
- package/dist/_vercel-target.d.ts +169 -0
- package/dist/_vite-env-BiyJ0GQH.mjs +105 -0
- package/dist/_vite-env.d.ts +38 -0
- package/dist/_vitest-runner-CKI8_K1b.mjs +207 -0
- package/dist/_vitest-runner.d.ts +182 -0
- package/dist/_workflow-determinism-CLxFQ5ox.mjs +198 -0
- package/dist/_workflow-determinism.d.ts +118 -0
- package/dist/build-B37oBfEv.mjs +592 -0
- package/dist/build.d.ts +146 -0
- package/dist/cli-workflow.d.ts +10 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +1061 -194
- package/dist/client-bundler-D4SeZJ8E.mjs +240 -0
- package/dist/client-bundler.d.ts +32 -0
- package/dist/client-bundler.mjs +3 -0
- package/dist/console-D6OOjjeJ.mjs +443 -0
- package/dist/console.d.ts +70 -0
- package/dist/delete-Br0EOH0g.mjs +55 -0
- package/dist/delete.d.ts +25 -0
- package/dist/deploy-CLUH5cv2.mjs +97 -0
- package/dist/deploy.d.ts +25 -0
- package/dist/dev-ZVuyPLUk.mjs +274 -0
- package/dist/dev.d.ts +34 -0
- package/dist/eval-Dl8o91yC.mjs +74 -0
- package/dist/eval.d.ts +46 -0
- package/dist/init-x3FsKl2q.mjs +609 -0
- package/dist/init.d.ts +101 -0
- package/dist/login-oJdBWu2B.mjs +166 -0
- package/dist/login.d.ts +54 -0
- package/dist/logs-BfRq1HX9.mjs +80 -0
- package/dist/logs.d.ts +65 -0
- package/dist/project-config.d.ts +23 -0
- package/dist/project-config.mjs +3 -0
- package/dist/scaffold/.env.example +51 -0
- package/dist/scaffold/CLAUDE.md +390 -0
- package/dist/scaffold/agent-guide/AGENT-API.md +223 -0
- package/dist/scaffold/agent-guide/HOSTING.md +140 -0
- package/dist/scaffold/agent-guide/PIPELINE-TUNING.md +235 -0
- package/dist/scaffold/agent-guide/PROVIDERS.md +143 -0
- package/dist/scaffold/agent-guide/TESTING-EVALS.md +158 -0
- package/dist/scaffold/agent-guide/TOOLS.md +628 -0
- package/dist/scaffold/agent-guide/UI.md +291 -0
- package/dist/scaffold/agent-guide/WORKFLOWS.md +801 -0
- package/dist/scaffold/package.json +38 -0
- package/dist/scaffold/pnpm-workspace.yaml +45 -0
- package/dist/scaffold/tsconfig.json +3 -0
- package/dist/scaffold/vitest.config.ts +8 -0
- package/dist/secret-Db1UWLSZ.mjs +300 -0
- package/dist/secret.d.ts +70 -0
- package/dist/start.d.ts +112 -0
- package/dist/start.mjs +183 -0
- package/dist/studio-DAoJApzD.mjs +209 -0
- package/dist/studio.d.ts +55 -0
- package/dist/templates/applicant-screening-agent/agent.eval.test.ts +258 -0
- package/dist/templates/applicant-screening-agent/agent.test.ts +987 -0
- package/dist/templates/applicant-screening-agent/agent.ts +66 -0
- package/dist/templates/applicant-screening-agent/client.tsx +154 -0
- package/dist/templates/applicant-screening-agent/crews.ts +432 -0
- package/dist/templates/applicant-screening-agent/leads.json +86 -0
- package/dist/templates/applicant-screening-agent/screening-lock.test.ts +77 -0
- package/dist/templates/applicant-screening-agent/screening-lock.ts +51 -0
- package/dist/templates/applicant-screening-agent/shared.ts +483 -0
- package/dist/templates/applicant-screening-agent/system-prompt.md +21 -0
- package/dist/templates/applicant-screening-agent/tools/candidate_details.ts +49 -0
- package/dist/templates/applicant-screening-agent/tools/proceed_to_emails.ts +127 -0
- package/dist/templates/applicant-screening-agent/tools/read_email.ts +50 -0
- package/dist/templates/applicant-screening-agent/tools/rescore_with_feedback.ts +140 -0
- package/dist/templates/applicant-screening-agent/tools/screen_candidates.ts +128 -0
- package/dist/templates/applicant-screening-agent/tools/screening_status.ts +51 -0
- package/dist/templates/call-audit-workflow/agent.eval.test.ts +492 -0
- package/dist/templates/call-audit-workflow/agent.test.ts +1032 -0
- package/dist/templates/call-audit-workflow/agent.ts +161 -0
- package/dist/templates/call-audit-workflow/client.tsx +236 -0
- package/dist/templates/call-audit-workflow/guards.test.ts +233 -0
- package/dist/templates/call-audit-workflow/workflows/audit.ts +391 -0
- package/dist/templates/call-audit-workflow/workflows/ingest.ts +279 -0
- package/dist/templates/call-audit-workflow/workflows/media.ts +729 -0
- package/dist/templates/call-audit-workflow/workflows/summarize.ts +201 -0
- package/dist/templates/call-audit-workflow/workflows/sync-api.ts +54 -0
- package/dist/templates/code-interpreter-agent/agent.eval.test.ts +195 -0
- package/dist/templates/code-interpreter-agent/agent.test.ts +91 -0
- package/dist/templates/code-interpreter-agent/agent.ts +9 -0
- package/dist/templates/code-interpreter-agent/system-prompt.md +18 -0
- package/dist/templates/coding-agent/agent.eval.test.ts +135 -0
- package/dist/templates/coding-agent/agent.test.ts +109 -0
- package/dist/templates/coding-agent/agent.ts +45 -0
- package/dist/templates/coding-agent/chat.ts +63 -0
- package/dist/templates/coding-agent/shared.ts +46 -0
- package/dist/templates/coding-agent/system-prompt.md +32 -0
- package/dist/templates/coding-agent/tools/bash.ts +6 -0
- package/dist/templates/coding-agent/tools/delete_file.ts +6 -0
- package/dist/templates/coding-agent/tools/edit_file.ts +6 -0
- package/dist/templates/coding-agent/tools/glob.ts +6 -0
- package/dist/templates/coding-agent/tools/grep.ts +6 -0
- package/dist/templates/coding-agent/tools/list_files.ts +6 -0
- package/dist/templates/coding-agent/tools/read_file.ts +6 -0
- package/dist/templates/coding-agent/tools/todo_write.ts +6 -0
- package/dist/templates/coding-agent/tools/write_file.ts +6 -0
- package/dist/templates/custom-pipeline-agent/agent.eval.test.ts +79 -0
- package/dist/templates/custom-pipeline-agent/agent.test.ts +79 -0
- package/dist/templates/custom-pipeline-agent/agent.ts +13 -0
- package/dist/templates/custom-pipeline-agent/modes.test.ts +162 -0
- package/dist/templates/custom-pipeline-agent/stages.test.ts +330 -0
- package/dist/templates/document-redline-workflow/agent.eval.test.ts +254 -0
- package/dist/templates/document-redline-workflow/agent.test.ts +552 -0
- package/dist/templates/document-redline-workflow/agent.ts +112 -0
- package/dist/templates/document-redline-workflow/client.tsx +224 -0
- package/dist/templates/document-redline-workflow/form.ts +74 -0
- package/dist/templates/document-redline-workflow/workflows/prompts.ts +68 -0
- package/dist/templates/document-redline-workflow/workflows/redline.ts +317 -0
- package/dist/templates/emergency-dispatch-agent/agent.eval.test.ts +372 -0
- package/dist/templates/emergency-dispatch-agent/agent.test.ts +576 -0
- package/dist/templates/emergency-dispatch-agent/agent.ts +63 -0
- package/dist/templates/emergency-dispatch-agent/client.tsx +453 -0
- package/dist/templates/emergency-dispatch-agent/events.ts +48 -0
- package/dist/templates/emergency-dispatch-agent/guardrails.ts +105 -0
- package/dist/templates/emergency-dispatch-agent/shared.ts +768 -0
- package/dist/templates/emergency-dispatch-agent/system-prompt.md +42 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_add_note.ts +28 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_create.ts +95 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_escalate.ts +96 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_get.ts +40 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_triage.ts +90 -0
- package/dist/templates/emergency-dispatch-agent/tools/incident_update_status.ts +75 -0
- package/dist/templates/emergency-dispatch-agent/tools/ops_dashboard.ts +72 -0
- package/dist/templates/emergency-dispatch-agent/tools/ops_protocols.ts +27 -0
- package/dist/templates/emergency-dispatch-agent/tools/ops_run_scenario.ts +154 -0
- package/dist/templates/emergency-dispatch-agent/tools/resources_dispatch.ts +112 -0
- package/dist/templates/emergency-dispatch-agent/tools/resources_get_available.ts +34 -0
- package/dist/templates/emergency-dispatch-agent/tools/resources_update_status.ts +63 -0
- package/dist/templates/entertainment-picks-agent/agent.eval.test.ts +281 -0
- package/dist/templates/entertainment-picks-agent/agent.test.ts +260 -0
- package/dist/templates/entertainment-picks-agent/agent.ts +14 -0
- package/dist/templates/entertainment-picks-agent/client.tsx +169 -0
- package/dist/templates/entertainment-picks-agent/shared.ts +50 -0
- package/dist/templates/entertainment-picks-agent/system-prompt.md +19 -0
- package/dist/templates/entertainment-picks-agent/tools/recommend.ts +79 -0
- package/dist/templates/entertainment-picks-agent/tools/revisit.ts +56 -0
- package/dist/templates/executive-inbox-agent/agent.eval.test.ts +296 -0
- package/dist/templates/executive-inbox-agent/agent.test.ts +682 -0
- package/dist/templates/executive-inbox-agent/agent.ts +51 -0
- package/dist/templates/executive-inbox-agent/calendar.test.ts +203 -0
- package/dist/templates/executive-inbox-agent/client.tsx +195 -0
- package/dist/templates/executive-inbox-agent/inbox.ts +233 -0
- package/dist/templates/executive-inbox-agent/meeting.ts +138 -0
- package/dist/templates/executive-inbox-agent/nodes.ts +148 -0
- package/dist/templates/executive-inbox-agent/prompts.ts +333 -0
- package/dist/templates/executive-inbox-agent/review.ts +425 -0
- package/dist/templates/executive-inbox-agent/shared.ts +486 -0
- package/dist/templates/executive-inbox-agent/system-prompt.md +15 -0
- package/dist/templates/executive-inbox-agent/tools/accept.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/ask_question.ts +30 -0
- package/dist/templates/executive-inbox-agent/tools/draft_reply.ts +67 -0
- package/dist/templates/executive-inbox-agent/tools/edit.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/ignore.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/inbox_status.ts +27 -0
- package/dist/templates/executive-inbox-agent/tools/meeting_assistant.ts +52 -0
- package/dist/templates/executive-inbox-agent/tools/new_email.ts +50 -0
- package/dist/templates/executive-inbox-agent/tools/open_email.ts +157 -0
- package/dist/templates/executive-inbox-agent/tools/respond.ts +10 -0
- package/dist/templates/executive-inbox-agent/tools/review_memory.ts +22 -0
- package/dist/templates/executive-inbox-agent/tools/send_calendar_invite.ts +68 -0
- package/dist/templates/executive-inbox-agent/tools/triage_inbox.ts +75 -0
- package/dist/templates/front-desk-agent/agent.eval.test.ts +177 -0
- package/dist/templates/front-desk-agent/agent.test.ts +155 -0
- package/dist/templates/front-desk-agent/agent.ts +22 -0
- package/dist/templates/front-desk-agent/shared.ts +239 -0
- package/dist/templates/front-desk-agent/system-prompt.md +13 -0
- package/dist/templates/front-desk-agent/tools/verify_account.ts +41 -0
- package/dist/templates/home-assistant-agent/agent.eval.test.ts +176 -0
- package/dist/templates/home-assistant-agent/agent.test.ts +513 -0
- package/dist/templates/home-assistant-agent/agent.ts +37 -0
- package/dist/templates/home-assistant-agent/client.tsx +176 -0
- package/dist/templates/home-assistant-agent/ring.tsx +55 -0
- package/dist/templates/home-assistant-agent/shared.ts +130 -0
- package/dist/templates/home-assistant-agent/system-prompt.md +43 -0
- package/dist/templates/home-assistant-agent/tools/cancel_reminders.ts +16 -0
- package/dist/templates/home-assistant-agent/tools/deep_research.ts +55 -0
- package/dist/templates/home-assistant-agent/tools/remind_me.ts +53 -0
- package/dist/templates/home-assistant-agent/tools/stop.ts +25 -0
- package/dist/templates/home-assistant-agent/use-speaker.ts +98 -0
- package/dist/templates/home-assistant-agent/workflows/remind.ts +25 -0
- package/dist/templates/home-assistant-agent/workflows/research-prompts.ts +41 -0
- package/dist/templates/home-assistant-agent/workflows/research.ts +110 -0
- package/dist/templates/home-assistant-agent/workflows/text.ts +30 -0
- package/dist/templates/hotel-reception-agent/agent.eval.test.ts +241 -0
- package/dist/templates/hotel-reception-agent/agent.test.ts +1121 -0
- package/dist/templates/hotel-reception-agent/agent.ts +66 -0
- package/dist/templates/hotel-reception-agent/booking.ts +159 -0
- package/dist/templates/hotel-reception-agent/card.ts +92 -0
- package/dist/templates/hotel-reception-agent/catalogs.ts +219 -0
- package/dist/templates/hotel-reception-agent/client.tsx +150 -0
- package/dist/templates/hotel-reception-agent/concierge.ts +104 -0
- package/dist/templates/hotel-reception-agent/desk-seams.test.ts +339 -0
- package/dist/templates/hotel-reception-agent/desk.ts +220 -0
- package/dist/templates/hotel-reception-agent/disputes.ts +214 -0
- package/dist/templates/hotel-reception-agent/events.ts +80 -0
- package/dist/templates/hotel-reception-agent/hotel.ts +412 -0
- package/dist/templates/hotel-reception-agent/policies.ts +209 -0
- package/dist/templates/hotel-reception-agent/records.ts +384 -0
- package/dist/templates/hotel-reception-agent/restaurant.ts +147 -0
- package/dist/templates/hotel-reception-agent/seed.ts +955 -0
- package/dist/templates/hotel-reception-agent/session.ts +50 -0
- package/dist/templates/hotel-reception-agent/shared.ts +353 -0
- package/dist/templates/hotel-reception-agent/system-prompt.md +76 -0
- package/dist/templates/hotel-reception-agent/tools/abandon_booking.ts +31 -0
- package/dist/templates/hotel-reception-agent/tools/add_to_waitlist.ts +42 -0
- package/dist/templates/hotel-reception-agent/tools/book_airport_car.ts +58 -0
- package/dist/templates/hotel-reception-agent/tools/book_business_center.ts +44 -0
- package/dist/templates/hotel-reception-agent/tools/book_spa_appointment.ts +39 -0
- package/dist/templates/hotel-reception-agent/tools/book_tour.ts +35 -0
- package/dist/templates/hotel-reception-agent/tools/cancel_restaurant_reservation.ts +26 -0
- package/dist/templates/hotel-reception-agent/tools/cancel_room_booking.ts +64 -0
- package/dist/templates/hotel-reception-agent/tools/check_restaurant_availability.ts +24 -0
- package/dist/templates/hotel-reception-agent/tools/check_room_availability.ts +40 -0
- package/dist/templates/hotel-reception-agent/tools/choose_room.ts +93 -0
- package/dist/templates/hotel-reception-agent/tools/confirm_booking.ts +154 -0
- package/dist/templates/hotel-reception-agent/tools/dispatch_emergency.ts +62 -0
- package/dist/templates/hotel-reception-agent/tools/dispute_charge.ts +91 -0
- package/dist/templates/hotel-reception-agent/tools/flag_late_arrival.ts +27 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_booking.ts +49 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_guest_history.ts +28 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_invoice.ts +27 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_policy.ts +20 -0
- package/dist/templates/hotel-reception-agent/tools/lookup_restaurant_reservation.ts +27 -0
- package/dist/templates/hotel-reception-agent/tools/modify_restaurant_reservation.ts +75 -0
- package/dist/templates/hotel-reception-agent/tools/order_flowers.ts +40 -0
- package/dist/templates/hotel-reception-agent/tools/record_card.ts +46 -0
- package/dist/templates/hotel-reception-agent/tools/record_followup.ts +51 -0
- package/dist/templates/hotel-reception-agent/tools/record_group_inquiry.ts +45 -0
- package/dist/templates/hotel-reception-agent/tools/record_guest_details.ts +71 -0
- package/dist/templates/hotel-reception-agent/tools/reinstate_booking.ts +65 -0
- package/dist/templates/hotel-reception-agent/tools/request_flight_reconfirmation.ts +55 -0
- package/dist/templates/hotel-reception-agent/tools/resend_confirmation.ts +40 -0
- package/dist/templates/hotel-reception-agent/tools/reserve_table.ts +87 -0
- package/dist/templates/hotel-reception-agent/tools/resolve_room_conflict.ts +49 -0
- package/dist/templates/hotel-reception-agent/tools/schedule_wakeup_call.ts +49 -0
- package/dist/templates/hotel-reception-agent/tools/set_do_not_disturb.ts +29 -0
- package/dist/templates/hotel-reception-agent/tools/set_extras.ts +51 -0
- package/dist/templates/hotel-reception-agent/tools/set_stay.ts +98 -0
- package/dist/templates/hotel-reception-agent/tools/start_booking_modification.ts +58 -0
- package/dist/templates/hotel-reception-agent/tools/start_room_booking.ts +50 -0
- package/dist/templates/hotel-reception-agent/tools/take_guest_message.ts +72 -0
- package/dist/templates/hotel-reception-agent/tools/transfer_call.ts +48 -0
- package/dist/templates/hotel-reception-agent/tools/update_card.ts +46 -0
- package/dist/templates/hotel-reception-agent/tools/verify_booking.ts +96 -0
- package/dist/templates/link-digest-workflow/agent.eval.test.ts +231 -0
- package/dist/templates/link-digest-workflow/agent.test.ts +647 -0
- package/dist/templates/link-digest-workflow/agent.ts +100 -0
- package/dist/templates/link-digest-workflow/api-client.ts +144 -0
- package/dist/templates/link-digest-workflow/client.tsx +231 -0
- package/dist/templates/link-digest-workflow/workflows/digest.ts +334 -0
- package/dist/templates/medication-safety-agent/agent.eval.test.ts +182 -0
- package/dist/templates/medication-safety-agent/agent.test.ts +332 -0
- package/dist/templates/medication-safety-agent/agent.ts +62 -0
- package/dist/templates/medication-safety-agent/fda.test.ts +130 -0
- package/dist/templates/medication-safety-agent/fda.ts +159 -0
- package/dist/templates/medication-safety-agent/system-prompt.md +26 -0
- package/dist/templates/medication-safety-agent/tools/check_drug_interaction.ts +62 -0
- package/dist/templates/medication-safety-agent/tools/medication_lookup.ts +36 -0
- package/dist/templates/meeting-recap-agent/agent.eval.test.ts +446 -0
- package/dist/templates/meeting-recap-agent/agent.test.ts +1408 -0
- package/dist/templates/meeting-recap-agent/agent.ts +104 -0
- package/dist/templates/meeting-recap-agent/shared.ts +44 -0
- package/dist/templates/meeting-recap-agent/tools/cancel_recap.ts +23 -0
- package/dist/templates/meeting-recap-agent/tools/keep_transcript.ts +31 -0
- package/dist/templates/meeting-recap-agent/tools/recap_progress.ts +24 -0
- package/dist/templates/meeting-recap-agent/tools/recap_status.ts +45 -0
- package/dist/templates/meeting-recap-agent/tools/request_recap.ts +44 -0
- package/dist/templates/meeting-recap-agent/workflows/recap.ts +838 -0
- package/dist/templates/meeting-recap-agent/workflows/tokens.ts +47 -0
- package/dist/templates/pizza-ordering-agent/agent.eval.test.ts +228 -0
- package/dist/templates/pizza-ordering-agent/agent.test.ts +299 -0
- package/dist/templates/pizza-ordering-agent/agent.ts +24 -0
- package/dist/templates/pizza-ordering-agent/client.tsx +104 -0
- package/dist/templates/pizza-ordering-agent/shared.ts +225 -0
- package/dist/templates/pizza-ordering-agent/system-prompt.md +23 -0
- package/dist/templates/pizza-ordering-agent/tools/add_pizza.ts +27 -0
- package/dist/templates/pizza-ordering-agent/tools/place_order.ts +26 -0
- package/dist/templates/pizza-ordering-agent/tools/remove_pizza.ts +18 -0
- package/dist/templates/pizza-ordering-agent/tools/set_customer_name.ts +13 -0
- package/dist/templates/pizza-ordering-agent/tools/update_pizza.ts +28 -0
- package/dist/templates/pizza-ordering-agent/tools/view_order.ts +21 -0
- package/dist/templates/podcast-digest-workflow/agent.eval.test.ts +421 -0
- package/dist/templates/podcast-digest-workflow/agent.test.ts +1225 -0
- package/dist/templates/podcast-digest-workflow/agent.ts +143 -0
- package/dist/templates/podcast-digest-workflow/client.tsx +259 -0
- package/dist/templates/podcast-digest-workflow/workflows/digest.ts +499 -0
- package/dist/templates/podcast-digest-workflow/workflows/feeds.ts +575 -0
- package/dist/templates/podcast-digest-workflow/workflows/slack.ts +153 -0
- package/dist/templates/push-to-talk-agent/agent.eval.test.ts +78 -0
- package/dist/templates/push-to-talk-agent/agent.test.ts +63 -0
- package/dist/templates/push-to-talk-agent/agent.ts +22 -0
- package/dist/templates/push-to-talk-agent/client.tsx +124 -0
- package/dist/templates/push-to-talk-agent/shared.ts +28 -0
- package/dist/templates/push-to-talk-agent/system-prompt.md +11 -0
- package/dist/templates/push-to-talk-agent/tools/list_notes.ts +15 -0
- package/dist/templates/push-to-talk-agent/tools/save_note.ts +26 -0
- package/dist/templates/quickstart-agent/agent.eval.test.ts +148 -0
- package/dist/templates/quickstart-agent/agent.test.ts +96 -0
- package/dist/templates/quickstart-agent/agent.ts +25 -0
- package/dist/templates/quickstart-agent/system-prompt.md +8 -0
- package/dist/templates/quickstart-agent/tools/get_weather.ts +59 -0
- package/dist/templates/research-handoff-agent/agent.eval.test.ts +341 -0
- package/dist/templates/research-handoff-agent/agent.test.ts +831 -0
- package/dist/templates/research-handoff-agent/agent.ts +118 -0
- package/dist/templates/research-handoff-agent/shared.ts +41 -0
- package/dist/templates/research-handoff-agent/tools/file_it_now.ts +32 -0
- package/dist/templates/research-handoff-agent/tools/request_research.ts +33 -0
- package/dist/templates/research-handoff-agent/tools/research_progress.ts +23 -0
- package/dist/templates/research-handoff-agent/tools/research_status.ts +73 -0
- package/dist/templates/research-handoff-agent/workflows/filing.ts +164 -0
- package/dist/templates/research-handoff-agent/workflows/prompts.ts +46 -0
- package/dist/templates/research-handoff-agent/workflows/research.ts +100 -0
- package/dist/templates/research-handoff-agent/workflows/review.ts +43 -0
- package/dist/templates/research-planner-agent/agent.eval.test.ts +241 -0
- package/dist/templates/research-planner-agent/agent.test.ts +635 -0
- package/dist/templates/research-planner-agent/agent.ts +26 -0
- package/dist/templates/research-planner-agent/client.tsx +120 -0
- package/dist/templates/research-planner-agent/procedure.ts +287 -0
- package/dist/templates/research-planner-agent/prompts.ts +153 -0
- package/dist/templates/research-planner-agent/shared.ts +327 -0
- package/dist/templates/research-planner-agent/system-prompt.md +18 -0
- package/dist/templates/research-planner-agent/tools/plan_status.ts +41 -0
- package/dist/templates/research-planner-agent/tools/revise_plan.ts +71 -0
- package/dist/templates/research-planner-agent/tools/start_plan.ts +62 -0
- package/dist/templates/research-planner-agent/tools/work_next_step.ts +177 -0
- package/dist/templates/retail-orders-agent/address.ts +109 -0
- package/dist/templates/retail-orders-agent/agent.eval.test.ts +305 -0
- package/dist/templates/retail-orders-agent/agent.test.ts +1260 -0
- package/dist/templates/retail-orders-agent/agent.ts +103 -0
- package/dist/templates/retail-orders-agent/authenticate.ts +34 -0
- package/dist/templates/retail-orders-agent/cancel.ts +114 -0
- package/dist/templates/retail-orders-agent/client.tsx +579 -0
- package/dist/templates/retail-orders-agent/keyterms.ts +154 -0
- package/dist/templates/retail-orders-agent/payment.ts +103 -0
- package/dist/templates/retail-orders-agent/pending.test.ts +204 -0
- package/dist/templates/retail-orders-agent/pending.ts +137 -0
- package/dist/templates/retail-orders-agent/refund.ts +19 -0
- package/dist/templates/retail-orders-agent/registry.test.ts +446 -0
- package/dist/templates/retail-orders-agent/resolve.test.ts +100 -0
- package/dist/templates/retail-orders-agent/resolve.ts +114 -0
- package/dist/templates/retail-orders-agent/returns.ts +101 -0
- package/dist/templates/retail-orders-agent/seed.json +4260 -0
- package/dist/templates/retail-orders-agent/seed.test.ts +233 -0
- package/dist/templates/retail-orders-agent/shared.test.ts +240 -0
- package/dist/templates/retail-orders-agent/shared.ts +547 -0
- package/dist/templates/retail-orders-agent/store.test.ts +331 -0
- package/dist/templates/retail-orders-agent/store.ts +485 -0
- package/dist/templates/retail-orders-agent/swap.test.ts +189 -0
- package/dist/templates/retail-orders-agent/swap.ts +358 -0
- package/dist/templates/retail-orders-agent/system-prompt.md +152 -0
- package/dist/templates/retail-orders-agent/tools/cancel_change.ts +33 -0
- package/dist/templates/retail-orders-agent/tools/cancel_pending_order.ts +31 -0
- package/dist/templates/retail-orders-agent/tools/confirm_change.ts +42 -0
- package/dist/templates/retail-orders-agent/tools/exchange_delivered_order_items.ts +47 -0
- package/dist/templates/retail-orders-agent/tools/find_user_id_by_email.ts +31 -0
- package/dist/templates/retail-orders-agent/tools/find_user_id_by_name_zip.ts +36 -0
- package/dist/templates/retail-orders-agent/tools/get_item_details.ts +27 -0
- package/dist/templates/retail-orders-agent/tools/get_order_details.ts +37 -0
- package/dist/templates/retail-orders-agent/tools/get_product_details.ts +30 -0
- package/dist/templates/retail-orders-agent/tools/get_user_details.ts +37 -0
- package/dist/templates/retail-orders-agent/tools/list_all_product_types.ts +22 -0
- package/dist/templates/retail-orders-agent/tools/modify_pending_order_address.ts +27 -0
- package/dist/templates/retail-orders-agent/tools/modify_pending_order_items.ts +48 -0
- package/dist/templates/retail-orders-agent/tools/modify_pending_order_payment.ts +32 -0
- package/dist/templates/retail-orders-agent/tools/modify_user_address.ts +26 -0
- package/dist/templates/retail-orders-agent/tools/return_delivered_order_items.ts +37 -0
- package/dist/templates/retail-orders-agent/tools/transfer_to_human_agents.ts +28 -0
- package/dist/templates/roadside-assistance-agent/agent.eval.test.ts +283 -0
- package/dist/templates/roadside-assistance-agent/agent.test.ts +650 -0
- package/dist/templates/roadside-assistance-agent/agent.ts +89 -0
- package/dist/templates/roadside-assistance-agent/call.ts +232 -0
- package/dist/templates/roadside-assistance-agent/events.ts +92 -0
- package/dist/templates/roadside-assistance-agent/shared.ts +346 -0
- package/dist/templates/roadside-assistance-agent/system-prompt.md +37 -0
- package/dist/templates/roadside-assistance-agent/tools/acknowledge_disclosure.ts +61 -0
- package/dist/templates/roadside-assistance-agent/tools/dispatch_truck.ts +149 -0
- package/dist/templates/roadside-assistance-agent/tools/job_status.ts +38 -0
- package/dist/templates/roadside-assistance-agent/tools/lookup_coverage.ts +83 -0
- package/dist/templates/roadside-assistance-agent/tools/report_location.ts +79 -0
- package/dist/templates/roadside-assistance-agent/tools/service_disclosure.ts +51 -0
- package/dist/templates/roadside-assistance-agent/yard.test.ts +162 -0
- package/dist/templates/roadside-assistance-agent/yard.ts +183 -0
- package/dist/templates/spoken-summary-workflow/agent.eval.test.ts +354 -0
- package/dist/templates/spoken-summary-workflow/agent.test.ts +493 -0
- package/dist/templates/spoken-summary-workflow/agent.ts +164 -0
- package/dist/templates/spoken-summary-workflow/client.tsx +220 -0
- package/dist/templates/spoken-summary-workflow/workflows/summarize.ts +260 -0
- package/dist/templates/spoken-summary-workflow/workflows/transcribe.ts +137 -0
- package/dist/templates/tabletop-rpg-agent/agent.eval.test.ts +314 -0
- package/dist/templates/tabletop-rpg-agent/agent.test.ts +1000 -0
- package/dist/templates/tabletop-rpg-agent/agent.ts +58 -0
- package/dist/templates/tabletop-rpg-agent/client.tsx +814 -0
- package/dist/templates/tabletop-rpg-agent/shared.ts +1028 -0
- package/dist/templates/tabletop-rpg-agent/system-prompt.md +116 -0
- package/dist/templates/tabletop-rpg-agent/tools/action_roll.ts +119 -0
- package/dist/templates/tabletop-rpg-agent/tools/burn_momentum.ts +110 -0
- package/dist/templates/tabletop-rpg-agent/tools/check_state.ts +37 -0
- package/dist/templates/tabletop-rpg-agent/tools/oracle.ts +255 -0
- package/dist/templates/tabletop-rpg-agent/tools/setup_character.ts +228 -0
- package/dist/templates/tabletop-rpg-agent/tools/update_state.ts +194 -0
- package/dist/templates/technical-support-agent/agent.eval.test.ts +260 -0
- package/dist/templates/technical-support-agent/agent.test.ts +424 -0
- package/dist/templates/technical-support-agent/agent.ts +39 -0
- package/dist/templates/technical-support-agent/client.tsx +132 -0
- package/dist/templates/technical-support-agent/knowledge.json +65 -0
- package/dist/templates/technical-support-agent/knowledge.ts +165 -0
- package/dist/templates/technical-support-agent/nodes.ts +143 -0
- package/dist/templates/technical-support-agent/procedure.ts +453 -0
- package/dist/templates/technical-support-agent/prompts.ts +102 -0
- package/dist/templates/technical-support-agent/shared.ts +128 -0
- package/dist/templates/technical-support-agent/system-prompt.md +18 -0
- package/dist/templates/technical-support-agent/tools/answer_question.ts +134 -0
- package/dist/templates/technical-support-agent/tools/list_topics.ts +23 -0
- package/dist/templates/technical-support-agent/tools/log_ticket.ts +30 -0
- package/dist/templates/text-adventure-agent/agent.eval.test.ts +222 -0
- package/dist/templates/text-adventure-agent/agent.test.ts +429 -0
- package/dist/templates/text-adventure-agent/agent.ts +76 -0
- package/dist/templates/text-adventure-agent/client.tsx +359 -0
- package/dist/templates/text-adventure-agent/shared.ts +210 -0
- package/dist/templates/text-adventure-agent/system-prompt.md +50 -0
- package/dist/templates/text-adventure-agent/tools/game_state_drop.ts +29 -0
- package/dist/templates/text-adventure-agent/tools/game_state_flag.ts +13 -0
- package/dist/templates/text-adventure-agent/tools/game_state_get.ts +17 -0
- package/dist/templates/text-adventure-agent/tools/game_state_move.ts +15 -0
- package/dist/templates/text-adventure-agent/tools/game_state_restart.ts +13 -0
- package/dist/templates/text-adventure-agent/tools/game_state_score.ts +19 -0
- package/dist/templates/text-adventure-agent/tools/game_state_take.ts +13 -0
- package/dist/templates/topic-briefing-agent/agent.eval.test.ts +202 -0
- package/dist/templates/topic-briefing-agent/agent.test.ts +651 -0
- package/dist/templates/topic-briefing-agent/agent.ts +45 -0
- package/dist/templates/topic-briefing-agent/shared.ts +392 -0
- package/dist/templates/topic-briefing-agent/slack.ts +108 -0
- package/dist/templates/topic-briefing-agent/system-prompt.md +54 -0
- package/dist/templates/topic-briefing-agent/tools/briefing_so_far.ts +43 -0
- package/dist/templates/topic-briefing-agent/tools/research_topic.ts +80 -0
- package/dist/templates/topic-briefing-agent/tools/send_briefing.ts +115 -0
- package/dist/templates/topic-briefing-agent/tools/verify_claim.ts +123 -0
- package/dist/templates/transcription-workflow/agent.eval.test.ts +237 -0
- package/dist/templates/transcription-workflow/agent.test.ts +2032 -0
- package/dist/templates/transcription-workflow/agent.ts +188 -0
- package/dist/templates/transcription-workflow/client.tsx +511 -0
- package/dist/templates/transcription-workflow/recover.test.ts +222 -0
- package/dist/templates/transcription-workflow/recover.ts +154 -0
- package/dist/templates/transcription-workflow/run-panel.tsx +212 -0
- package/dist/templates/transcription-workflow/total-latency.tsx +170 -0
- package/dist/templates/transcription-workflow/workflows/batch.ts +189 -0
- package/dist/templates/transcription-workflow/workflows/downsample.ts +273 -0
- package/dist/templates/transcription-workflow/workflows/normalize.ts +385 -0
- package/dist/templates/transcription-workflow/workflows/stitch.ts +122 -0
- package/dist/templates/transcription-workflow/workflows/stream.ts +690 -0
- package/dist/templates/transcription-workflow/workflows/sync-api.ts +81 -0
- package/dist/templates/transcription-workflow/workflows/transcribe.ts +479 -0
- package/dist/templates/transcription-workflow/workflows/wav.ts +250 -0
- package/dist/templates/travel-concierge-agent/agent.eval.test.ts +300 -0
- package/dist/templates/travel-concierge-agent/agent.test.ts +601 -0
- package/dist/templates/travel-concierge-agent/agent.ts +62 -0
- package/dist/templates/travel-concierge-agent/call-events.ts +80 -0
- package/dist/templates/travel-concierge-agent/client.tsx +146 -0
- package/dist/templates/travel-concierge-agent/routing.ts +170 -0
- package/dist/templates/travel-concierge-agent/shared.ts +862 -0
- package/dist/templates/travel-concierge-agent/system-prompt.md +30 -0
- package/dist/templates/travel-concierge-agent/tools/book_car_rental.ts +21 -0
- package/dist/templates/travel-concierge-agent/tools/book_excursion.ts +19 -0
- package/dist/templates/travel-concierge-agent/tools/book_hotel.ts +21 -0
- package/dist/templates/travel-concierge-agent/tools/cancel_action.ts +9 -0
- package/dist/templates/travel-concierge-agent/tools/cancel_ticket.ts +21 -0
- package/dist/templates/travel-concierge-agent/tools/complete_or_escalate.ts +9 -0
- package/dist/templates/travel-concierge-agent/tools/confirm_action.ts +9 -0
- package/dist/templates/travel-concierge-agent/tools/lookup_booking.ts +36 -0
- package/dist/templates/travel-concierge-agent/tools/search_car_rentals.ts +36 -0
- package/dist/templates/travel-concierge-agent/tools/search_excursions.ts +40 -0
- package/dist/templates/travel-concierge-agent/tools/search_flights.ts +58 -0
- package/dist/templates/travel-concierge-agent/tools/search_hotels.ts +39 -0
- package/dist/templates/travel-concierge-agent/tools/to_car_rental_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/to_excursion_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/to_flight_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/to_hotel_assistant.ts +11 -0
- package/dist/templates/travel-concierge-agent/tools/update_ticket.ts +23 -0
- package/dist/templates/web-research-agent/agent.eval.test.ts +144 -0
- package/dist/templates/web-research-agent/agent.test.ts +181 -0
- package/dist/templates/web-research-agent/agent.ts +128 -0
- package/dist/templates/web-research-agent/system-prompt.md +33 -0
- package/dist/templates/word-game-agent/agent.eval.test.ts +222 -0
- package/dist/templates/word-game-agent/agent.test.ts +484 -0
- package/dist/templates/word-game-agent/agent.ts +55 -0
- package/dist/templates/word-game-agent/client.tsx +211 -0
- package/dist/templates/word-game-agent/game.ts +133 -0
- package/dist/templates/word-game-agent/guess.ts +63 -0
- package/dist/templates/word-game-agent/player.ts +67 -0
- package/dist/templates/word-game-agent/shared.ts +249 -0
- package/dist/templates/word-game-agent/system-prompt.md +15 -0
- package/dist/templates/word-game-agent/tools/final_score.ts +37 -0
- package/dist/templates/word-game-agent/tools/relay_description.ts +137 -0
- package/dist/templates/word-game-agent/tools/repeat_word.ts +19 -0
- package/dist/templates/word-game-agent/tools/skip_word.ts +31 -0
- package/dist/templates/word-game-agent/tools/start_game.ts +52 -0
- package/dist/templates/word-game-agent/words.ts +278 -0
- package/dist/test-XufelYGW.mjs +104 -0
- package/dist/test.d.ts +81 -0
- package/dist/typecheck.d.ts +44 -0
- package/dist/typecheck.mjs +185 -0
- package/dist/worker-bundler.d.ts +37 -0
- package/dist/worker-bundler.mjs +156 -0
- package/dist/workflow-CDUlTD5B.mjs +239 -0
- package/dist/workflow.d.ts +76 -0
- package/package.json +75 -24
- package/dist/_api-client-H4MFOr8j.mjs +0 -35
- package/dist/_bundler-2yKukgnU.mjs +0 -125
- package/dist/_discover-a8yIuqEp.mjs +0 -220
- package/dist/_init-VzVTpJFZ.mjs +0 -56
- package/dist/_templates-CtZBILce.mjs +0 -72
- package/dist/_ui-DWGXImbO.mjs +0 -30
- package/dist/delete-BvRel3Tw.mjs +0 -34
- package/dist/deploy-CnscqVZv.mjs +0 -92
- package/dist/dev-DEZKrw8v.mjs +0 -18
- package/dist/init-BYX6pxjd.mjs +0 -114
- package/dist/secret-DLosn47q.mjs +0 -47
- package/dist/test-CYoqKJP0.mjs +0 -38
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
import { formatMoney, plural } from "@alexkroman1/aai/utils";
|
|
2
|
+
import "@alexkroman1/aai-ui/styles.css";
|
|
3
|
+
import type {
|
|
4
|
+
AgentState,
|
|
5
|
+
ChatMessage,
|
|
6
|
+
SessionControlButton,
|
|
7
|
+
ToolCallInfo,
|
|
8
|
+
} from "@alexkroman1/aai-ui";
|
|
9
|
+
import {
|
|
10
|
+
ConversationView,
|
|
11
|
+
mountClient,
|
|
12
|
+
SessionControls,
|
|
13
|
+
SessionErrorBanner,
|
|
14
|
+
SessionStateDot,
|
|
15
|
+
ToolCallRow,
|
|
16
|
+
useAgentState,
|
|
17
|
+
} from "@alexkroman1/aai-ui";
|
|
18
|
+
import type { ReactNode } from "react";
|
|
19
|
+
import type {
|
|
20
|
+
OrderStatus,
|
|
21
|
+
OrderView,
|
|
22
|
+
PaymentMethodView,
|
|
23
|
+
PendingView,
|
|
24
|
+
StoreView,
|
|
25
|
+
SwapOptionView,
|
|
26
|
+
} from "./shared.ts";
|
|
27
|
+
import { DEMO_PERSONAS, emptyRetailState, storeView } from "./shared.ts";
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* The desk's own motion is the slide-in alone; the pulse it declared beside it
|
|
31
|
+
* was the SDK's `aai-pulse` under another name. Scrollbars are `.aai-scroll`
|
|
32
|
+
* from the same stylesheet, told the thumb colour through a custom property.
|
|
33
|
+
*/
|
|
34
|
+
const CSS = `
|
|
35
|
+
@keyframes rt-slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
|
|
36
|
+
.rt-main { --aai-scrollbar-thumb: #d4d4d8; }
|
|
37
|
+
@media (max-width: 900px) {
|
|
38
|
+
/* Both rows bounded: an auto row sizes to the sidebar's full content, which
|
|
39
|
+
would push the chat (and its Hold/End controls) past the viewport. */
|
|
40
|
+
.rt-main { grid-template-columns: 1fr !important; grid-template-rows: minmax(0, 1fr) minmax(0, 40%) !important; }
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
// `satisfies`-pinned to the shared union, so a new order status is a compile
|
|
45
|
+
// error here rather than a silently grey badge.
|
|
46
|
+
const statusColors: Record<string, string> = {
|
|
47
|
+
pending: "#b45309",
|
|
48
|
+
"pending (item modified)": "#7c3aed",
|
|
49
|
+
processed: "#0369a1",
|
|
50
|
+
delivered: "#15803d",
|
|
51
|
+
cancelled: "#71717a",
|
|
52
|
+
"return requested": "#c2410c",
|
|
53
|
+
"exchange requested": "#a16207",
|
|
54
|
+
} satisfies Record<OrderStatus, string>;
|
|
55
|
+
|
|
56
|
+
// The sidebar before the first tool call, derived from the projection itself so
|
|
57
|
+
// a new StoreView field can't miss the pre-first-call render.
|
|
58
|
+
//
|
|
59
|
+
// **This is one of two templates that do NOT pass the projection to
|
|
60
|
+
// `useAgentState`** — they name the slot (`"retail"`) and pass this fallback —
|
|
61
|
+
// and the reason is the browser bundle rather than style:
|
|
62
|
+
// that overload derives the empty frame by calling the projection, which calls
|
|
63
|
+
// the slot's `create()` — and this slot's factory lives in `store.ts` and pulls
|
|
64
|
+
// the 107 KB seed, so importing it here would ship the whole catalog to the
|
|
65
|
+
// browser. `emptyRetailState()` is the same shape without the seed. Reach for
|
|
66
|
+
// the projection overload everywhere the factory is cheap, which is every
|
|
67
|
+
// other stateful template.
|
|
68
|
+
const EMPTY_VIEW: StoreView = storeView(emptyRetailState());
|
|
69
|
+
|
|
70
|
+
// The dot's colour per session state, as an EXHAUSTIVE map rather than an
|
|
71
|
+
// if-chain with a grey default.
|
|
72
|
+
//
|
|
73
|
+
// The palette is this template's own — every client here paints the same six
|
|
74
|
+
// states in its own colours, so it is the one prop `<SessionStateDot>` cannot
|
|
75
|
+
// default. What the SDK does own is `AgentState`, and `satisfies
|
|
76
|
+
// Record<AgentState, string>` is what borrows it: a state added there stops
|
|
77
|
+
// compiling here, where the `state === "…"` chain this replaced answered a new
|
|
78
|
+
// state with a silent grey badge in three separate files and no way to notice.
|
|
79
|
+
const STATE_COLORS = {
|
|
80
|
+
disconnected: "#a1a1aa",
|
|
81
|
+
connecting: "#a1a1aa",
|
|
82
|
+
ready: "#16a34a",
|
|
83
|
+
listening: "#16a34a",
|
|
84
|
+
thinking: "#ca8a04",
|
|
85
|
+
speaking: "#2563eb",
|
|
86
|
+
error: "#a1a1aa",
|
|
87
|
+
} satisfies Record<AgentState, string>;
|
|
88
|
+
|
|
89
|
+
function Panel({ title, children }: { title: string; children: ReactNode }) {
|
|
90
|
+
return (
|
|
91
|
+
<div className="rounded-lg p-3" style={{ background: "#ffffff", border: "1px solid #e4e4e7" }}>
|
|
92
|
+
<div
|
|
93
|
+
className="text-[10px] font-semibold uppercase tracking-[1.3px] mb-2"
|
|
94
|
+
style={{ color: "#71717a" }}
|
|
95
|
+
>
|
|
96
|
+
{title}
|
|
97
|
+
</div>
|
|
98
|
+
{children}
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function MethodRow({ method }: { method: PaymentMethodView }) {
|
|
104
|
+
return (
|
|
105
|
+
<div className="flex justify-between items-center py-0.5 text-xs">
|
|
106
|
+
<span style={{ color: "#52525b" }}>{method.label}</span>
|
|
107
|
+
{method.balance === undefined ? (
|
|
108
|
+
<span className="text-[10px] uppercase tracking-wider" style={{ color: "#a1a1aa" }}>
|
|
109
|
+
on file
|
|
110
|
+
</span>
|
|
111
|
+
) : (
|
|
112
|
+
<span className="font-semibold tabular-nums" style={{ color: "#15803d" }}>
|
|
113
|
+
{formatMoney(method.balance)}
|
|
114
|
+
</span>
|
|
115
|
+
)}
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function OrderCard({ order, focused }: { order: OrderView; focused: boolean }) {
|
|
121
|
+
const color = statusColors[order.status] ?? "#71717a";
|
|
122
|
+
return (
|
|
123
|
+
<div
|
|
124
|
+
className="rounded-md p-2.5 mb-2"
|
|
125
|
+
style={{
|
|
126
|
+
background: focused ? "#fafafa" : "#ffffff",
|
|
127
|
+
animation: "rt-slide-in 0.25s ease-out",
|
|
128
|
+
border: `1px solid ${focused ? color : "#e4e4e7"}`,
|
|
129
|
+
borderLeft: `3px solid ${color}`,
|
|
130
|
+
boxShadow: focused ? `0 0 0 2px ${color}22` : "none",
|
|
131
|
+
}}
|
|
132
|
+
>
|
|
133
|
+
<div className="flex justify-between items-center gap-2 mb-1">
|
|
134
|
+
<span className="text-xs font-semibold tabular-nums" style={{ color: "#18181b" }}>
|
|
135
|
+
{order.orderId}
|
|
136
|
+
</span>
|
|
137
|
+
<span
|
|
138
|
+
className="text-[9px] px-1.5 py-0.5 rounded font-semibold uppercase whitespace-nowrap"
|
|
139
|
+
style={{ background: `${color}1a`, color }}
|
|
140
|
+
>
|
|
141
|
+
{order.status}
|
|
142
|
+
</span>
|
|
143
|
+
</div>
|
|
144
|
+
<div className="text-[11px] mb-1 tabular-nums" style={{ color: "#71717a" }}>
|
|
145
|
+
{formatMoney(order.total)} · {order.items.length} {plural(order.items.length, "item")}
|
|
146
|
+
</div>
|
|
147
|
+
{order.items.slice(0, 3).map((item) => (
|
|
148
|
+
<div
|
|
149
|
+
key={`${item.itemId}-${item.name}`}
|
|
150
|
+
className="text-[11px]"
|
|
151
|
+
style={{ color: "#52525b" }}
|
|
152
|
+
>
|
|
153
|
+
· {item.name}{" "}
|
|
154
|
+
<span style={{ color: "#a1a1aa" }}>{Object.values(item.options).join(", ")}</span>
|
|
155
|
+
</div>
|
|
156
|
+
))}
|
|
157
|
+
{order.items.length > 3 && (
|
|
158
|
+
<div className="text-[11px]" style={{ color: "#a1a1aa" }}>
|
|
159
|
+
· and {order.items.length - 3} more
|
|
160
|
+
</div>
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** Character select. Rendered before authentication, because a user with no
|
|
167
|
+
* email to give cannot start the conversation at all. */
|
|
168
|
+
/**
|
|
169
|
+
* The change waiting on the caller's word.
|
|
170
|
+
*
|
|
171
|
+
* The one panel that renders BECAUSE nothing has happened. A staged change is
|
|
172
|
+
* the agent's promise about what it is going to do, so showing it beside the
|
|
173
|
+
* orders it has not touched is what lets a watcher catch a readback that does
|
|
174
|
+
* not match the request — which is the failure the whole gate is aimed at, and
|
|
175
|
+
* the one nobody can see from a transcript alone.
|
|
176
|
+
*/
|
|
177
|
+
function PendingChange({ pending }: { pending: PendingView }) {
|
|
178
|
+
return (
|
|
179
|
+
<div
|
|
180
|
+
className="rounded-lg p-3"
|
|
181
|
+
style={{
|
|
182
|
+
background: "#fffbeb",
|
|
183
|
+
border: "1px solid #fcd34d",
|
|
184
|
+
animation: "rt-slide-in 180ms ease-out",
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
187
|
+
<div
|
|
188
|
+
className="text-[10px] font-semibold uppercase tracking-wider mb-1.5 flex items-center gap-1.5"
|
|
189
|
+
style={{ color: "#b45309" }}
|
|
190
|
+
>
|
|
191
|
+
<span style={{ animation: "aai-pulse 1.4s ease-in-out infinite" }}>●</span>
|
|
192
|
+
Awaiting the caller's yes
|
|
193
|
+
</div>
|
|
194
|
+
<div className="text-xs leading-relaxed" style={{ color: "#78350f" }}>
|
|
195
|
+
{pending.readBack}
|
|
196
|
+
</div>
|
|
197
|
+
<div className="text-[10px] mt-1.5" style={{ color: "#a16207" }}>
|
|
198
|
+
Nothing has changed yet — {pending.kind}
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function PersonaList() {
|
|
205
|
+
return (
|
|
206
|
+
<div className="flex flex-col gap-2">
|
|
207
|
+
<div className="text-[11px] leading-snug" style={{ color: "#3f3f46" }}>
|
|
208
|
+
Pick someone to be, then read their email to the agent.
|
|
209
|
+
</div>
|
|
210
|
+
{DEMO_PERSONAS.map((persona) => (
|
|
211
|
+
<div
|
|
212
|
+
key={persona.email}
|
|
213
|
+
className="rounded-md p-2"
|
|
214
|
+
style={{ background: "#ffffff", border: "1px solid #e4e4e7" }}
|
|
215
|
+
>
|
|
216
|
+
<div className="text-xs font-semibold" style={{ color: "#18181b" }}>
|
|
217
|
+
{persona.name}
|
|
218
|
+
</div>
|
|
219
|
+
<div className="text-[11px] break-all" style={{ color: "#2563eb" }}>
|
|
220
|
+
{persona.email}
|
|
221
|
+
</div>
|
|
222
|
+
<div className="text-[10px] tabular-nums" style={{ color: "#a1a1aa" }}>
|
|
223
|
+
zip {persona.zip}
|
|
224
|
+
</div>
|
|
225
|
+
<div className="text-[10px] leading-snug mt-1" style={{ color: "#71717a" }}>
|
|
226
|
+
{persona.hint}
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
))}
|
|
230
|
+
</div>
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** What the focused order's items could become — the words a user needs in order
|
|
235
|
+
* to ask for an exchange or an item change. */
|
|
236
|
+
function SwapOptions({ option }: { option: SwapOptionView }) {
|
|
237
|
+
return (
|
|
238
|
+
<div className="mb-2.5">
|
|
239
|
+
<div className="text-[11px] font-semibold" style={{ color: "#18181b" }}>
|
|
240
|
+
{option.itemName}
|
|
241
|
+
</div>
|
|
242
|
+
<div className="text-[10px] mb-1" style={{ color: "#a1a1aa" }}>
|
|
243
|
+
now: {Object.values(option.currentOptions).join(", ")}
|
|
244
|
+
</div>
|
|
245
|
+
{option.alternatives.length === 0 ? (
|
|
246
|
+
<div className="text-[10px]" style={{ color: "#a1a1aa" }}>
|
|
247
|
+
No other option is in stock.
|
|
248
|
+
</div>
|
|
249
|
+
) : (
|
|
250
|
+
option.alternatives.map((alternative) => (
|
|
251
|
+
<div
|
|
252
|
+
key={alternative.itemId}
|
|
253
|
+
className="flex justify-between gap-2 text-[10px] py-0.5"
|
|
254
|
+
style={{ color: "#52525b" }}
|
|
255
|
+
>
|
|
256
|
+
<span>{Object.values(alternative.options).join(", ")}</span>
|
|
257
|
+
<span className="tabular-nums whitespace-nowrap" style={{ color: "#71717a" }}>
|
|
258
|
+
{formatMoney(alternative.price)}
|
|
259
|
+
</span>
|
|
260
|
+
</div>
|
|
261
|
+
))
|
|
262
|
+
)}
|
|
263
|
+
</div>
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The tool the agent ran: the SDK's compact row with the desk's own dot in its
|
|
269
|
+
* icon slot. `ToolCallRow` owns the shimmer while the call is pending and the
|
|
270
|
+
* row's shape; the dot's colours are this desk's.
|
|
271
|
+
*/
|
|
272
|
+
function ToolChip({ toolCall }: { toolCall: ToolCallInfo }) {
|
|
273
|
+
const pending = toolCall.status === "pending";
|
|
274
|
+
return (
|
|
275
|
+
<ToolCallRow
|
|
276
|
+
variant="compact"
|
|
277
|
+
className="self-start"
|
|
278
|
+
title={toolCall.name}
|
|
279
|
+
pending={pending}
|
|
280
|
+
icon={
|
|
281
|
+
<span
|
|
282
|
+
className="w-1.5 h-1.5 rounded-full inline-block align-middle"
|
|
283
|
+
style={{
|
|
284
|
+
background: pending ? "#ca8a04" : "#16a34a",
|
|
285
|
+
animation: pending ? "aai-pulse 1s ease-in-out infinite" : "none",
|
|
286
|
+
}}
|
|
287
|
+
/>
|
|
288
|
+
}
|
|
289
|
+
/>
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** One line of the call — the markup this template is for. */
|
|
294
|
+
function Bubble({ role, content }: ChatMessage) {
|
|
295
|
+
return (
|
|
296
|
+
<div
|
|
297
|
+
className="rounded-lg text-[13px] max-w-[80%] px-3.5 py-2.5"
|
|
298
|
+
style={{
|
|
299
|
+
lineHeight: 1.55,
|
|
300
|
+
alignSelf: role === "assistant" ? "flex-start" : "flex-end",
|
|
301
|
+
background: role === "assistant" ? "#ffffff" : "#2563eb",
|
|
302
|
+
color: role === "assistant" ? "#18181b" : "#ffffff",
|
|
303
|
+
border: role === "assistant" ? "1px solid #e4e4e7" : "none",
|
|
304
|
+
animation: "rt-slide-in 0.2s ease-out",
|
|
305
|
+
}}
|
|
306
|
+
>
|
|
307
|
+
{content}
|
|
308
|
+
</div>
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* The call transcript.
|
|
314
|
+
*
|
|
315
|
+
* `<ConversationView>` rather than `session.messages.map(...)`. The messages
|
|
316
|
+
* were only part of it: this agent runs FIFTEEN tools and the operator could
|
|
317
|
+
* see none of them, because tool calls live in a second array this page never
|
|
318
|
+
* read — and the streaming reply and the thinking indicator were dropped along
|
|
319
|
+
* with them. The view owns the interleave (a tool row follows the message it
|
|
320
|
+
* was anchored to), the `null`-vs-`""` transcript distinction, the
|
|
321
|
+
* thinking-suppression rule and the announced thinking row; the markup in each
|
|
322
|
+
* slot is what this template is for. The live transcript is the strip pinned
|
|
323
|
+
* BELOW the scroll, which is `transcriptPosition="below"`.
|
|
324
|
+
*
|
|
325
|
+
* It subscribes per FIELD, so the customer file in the sidebar no longer
|
|
326
|
+
* re-renders on every partial transcript the way the whole-page `useSession()`
|
|
327
|
+
* this replaced made it.
|
|
328
|
+
*/
|
|
329
|
+
function Conversation() {
|
|
330
|
+
return (
|
|
331
|
+
<ConversationView
|
|
332
|
+
scrollClassName="aai-scroll overflow-y-auto"
|
|
333
|
+
contentClassName="p-4 flex flex-col gap-2"
|
|
334
|
+
empty={
|
|
335
|
+
<div className="text-center p-10 text-[13px]" style={{ color: "#a1a1aa" }}>
|
|
336
|
+
Press start, then read one of the emails from “Who to be” to the agent.
|
|
337
|
+
</div>
|
|
338
|
+
}
|
|
339
|
+
renderMessage={(message) => <Bubble {...message} />}
|
|
340
|
+
renderTool={(toolCall) => <ToolChip toolCall={toolCall} />}
|
|
341
|
+
renderTranscript={({ text }) => (
|
|
342
|
+
<div
|
|
343
|
+
className="flex items-center px-4 py-2 text-xs italic min-h-8"
|
|
344
|
+
style={{ background: "#fafafa", borderTop: "1px solid #e4e4e7", color: "#71717a" }}
|
|
345
|
+
>
|
|
346
|
+
<span
|
|
347
|
+
className="w-2 h-2 rounded-full inline-block mr-2"
|
|
348
|
+
style={{ background: "#16a34a", animation: "aai-pulse 1.5s ease-in-out infinite" }}
|
|
349
|
+
/>
|
|
350
|
+
{text}
|
|
351
|
+
</div>
|
|
352
|
+
)}
|
|
353
|
+
transcriptPosition="below"
|
|
354
|
+
thinkingLabel="Agent is thinking"
|
|
355
|
+
thinkingClassName="self-start text-[11px] px-3.5 text-[#a1a1aa]"
|
|
356
|
+
/>
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/** The live status dot, on its own subscription rather than a field off a
|
|
361
|
+
* whole-page read — the header is the only thing here that wants it. No
|
|
362
|
+
* `labels`: the package's word for each state is the right one here, where a
|
|
363
|
+
* caller of this desk used to read a lowercase `disconnected` in the header. */
|
|
364
|
+
function StatusReadout() {
|
|
365
|
+
return (
|
|
366
|
+
<SessionStateDot
|
|
367
|
+
colors={STATE_COLORS}
|
|
368
|
+
labelClassName="text-[11px] font-normal text-[#a1a1aa]"
|
|
369
|
+
/>
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const CALL_BUTTON = "px-4 py-2 rounded-md text-xs font-semibold cursor-pointer";
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* One call button in the desk's colours. `<SessionControls>` decides WHICH
|
|
377
|
+
* buttons exist and what each presses — including that "New Conversation" is
|
|
378
|
+
* `end()` then `start()` and never `reset()`, argued once on that component;
|
|
379
|
+
* this decides only how they look.
|
|
380
|
+
*/
|
|
381
|
+
function callButton({ action, label, onClick, running }: SessionControlButton) {
|
|
382
|
+
const look =
|
|
383
|
+
action === "end"
|
|
384
|
+
? { background: "#dc2626", color: "#ffffff", border: "none" }
|
|
385
|
+
: action === "restart"
|
|
386
|
+
? { background: "#ffffff", color: "#18181b", border: "1px solid #e4e4e7" }
|
|
387
|
+
: action === "toggle" && running
|
|
388
|
+
? { background: "#e4e4e7", color: "#18181b", border: "none" }
|
|
389
|
+
: { background: "#2563eb", color: "#ffffff", border: "none" };
|
|
390
|
+
return (
|
|
391
|
+
<button type="button" className={CALL_BUTTON} style={look} onClick={onClick}>
|
|
392
|
+
{label}
|
|
393
|
+
</button>
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The call controls: Start call, then Hold/Resume, New Conversation and End.
|
|
399
|
+
* Two one-field subscriptions through `useSessionControls`, so the row
|
|
400
|
+
* re-renders when a flag flips and not on every STT partial the way the
|
|
401
|
+
* whole-snapshot `useSession()` it replaced did.
|
|
402
|
+
*/
|
|
403
|
+
function CallControls({ productCount }: { productCount: number }) {
|
|
404
|
+
return (
|
|
405
|
+
<SessionControls
|
|
406
|
+
className="px-4 py-3 bg-white border-t border-[#e4e4e7]"
|
|
407
|
+
labels={{ start: "Start call", pause: "Hold" }}
|
|
408
|
+
renderButton={callButton}
|
|
409
|
+
>
|
|
410
|
+
<div className="flex-1" />
|
|
411
|
+
<span className="text-[10px] tabular-nums" style={{ color: "#a1a1aa" }}>
|
|
412
|
+
{productCount} products
|
|
413
|
+
</span>
|
|
414
|
+
</SessionControls>
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function App() {
|
|
419
|
+
// The agent's own store, projected by `syncState` after every tool call —
|
|
420
|
+
// the only subscription at this level now. The session reads that used to sit
|
|
421
|
+
// beside it moved into the four components above, so a partial transcript no
|
|
422
|
+
// longer re-renders the customer file.
|
|
423
|
+
const view = useAgentState<StoreView>("retail", EMPTY_VIEW);
|
|
424
|
+
|
|
425
|
+
const lastAction = view.activity.at(-1);
|
|
426
|
+
|
|
427
|
+
return (
|
|
428
|
+
<>
|
|
429
|
+
<style>{CSS}</style>
|
|
430
|
+
<div
|
|
431
|
+
className="flex flex-col h-dvh overflow-hidden m-0 p-0"
|
|
432
|
+
style={{ background: "#f4f4f5", color: "#18181b" }}
|
|
433
|
+
>
|
|
434
|
+
<div
|
|
435
|
+
className="flex items-center justify-between px-5 py-3 gap-4 flex-wrap shrink-0"
|
|
436
|
+
style={{ background: "#ffffff", borderBottom: "1px solid #e4e4e7" }}
|
|
437
|
+
>
|
|
438
|
+
<div className="flex items-center gap-2.5 text-base font-semibold">
|
|
439
|
+
<span style={{ color: "#2563eb" }}>◆</span>
|
|
440
|
+
Retail Support
|
|
441
|
+
<StatusReadout />
|
|
442
|
+
</div>
|
|
443
|
+
<span
|
|
444
|
+
className="px-2.5 py-1 rounded text-[10px] font-semibold uppercase tracking-wider"
|
|
445
|
+
style={
|
|
446
|
+
view.customer
|
|
447
|
+
? { background: "#dcfce7", color: "#15803d" }
|
|
448
|
+
: { background: "#f4f4f5", color: "#71717a" }
|
|
449
|
+
}
|
|
450
|
+
>
|
|
451
|
+
{view.customer ? `Verified · ${view.customer.name}` : "Not yet identified"}
|
|
452
|
+
</span>
|
|
453
|
+
</div>
|
|
454
|
+
|
|
455
|
+
<div
|
|
456
|
+
className="rt-main flex-1 grid overflow-hidden"
|
|
457
|
+
style={{ gridTemplateColumns: "1fr 340px" }}
|
|
458
|
+
>
|
|
459
|
+
{/* Conversation */}
|
|
460
|
+
<div
|
|
461
|
+
className="flex flex-col overflow-hidden"
|
|
462
|
+
style={{ borderRight: "1px solid #e4e4e7" }}
|
|
463
|
+
>
|
|
464
|
+
<Conversation />
|
|
465
|
+
<SessionErrorBanner className="rounded-none border-x-0 border-b-0" />
|
|
466
|
+
<CallControls productCount={view.productCount} />
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
{/* Sidebar: the customer file */}
|
|
470
|
+
<div
|
|
471
|
+
className="aai-scroll overflow-y-auto p-3 flex flex-col gap-3"
|
|
472
|
+
style={{ background: "#f4f4f5" }}
|
|
473
|
+
>
|
|
474
|
+
{view.pending && <PendingChange pending={view.pending} />}
|
|
475
|
+
|
|
476
|
+
{!view.customer && (
|
|
477
|
+
<Panel title="Who to be">
|
|
478
|
+
<PersonaList />
|
|
479
|
+
</Panel>
|
|
480
|
+
)}
|
|
481
|
+
|
|
482
|
+
<Panel title="Customer">
|
|
483
|
+
{view.customer ? (
|
|
484
|
+
<>
|
|
485
|
+
<div className="text-sm font-semibold">{view.customer.name}</div>
|
|
486
|
+
<div className="text-[11px] break-all" style={{ color: "#71717a" }}>
|
|
487
|
+
{view.customer.email}
|
|
488
|
+
</div>
|
|
489
|
+
<div className="text-[11px] mt-1" style={{ color: "#71717a" }}>
|
|
490
|
+
{view.customer.address.address1}
|
|
491
|
+
{view.customer.address.address2 ? `, ${view.customer.address.address2}` : ""}
|
|
492
|
+
<br />
|
|
493
|
+
{view.customer.address.city} {view.customer.address.state}{" "}
|
|
494
|
+
{view.customer.address.zip}
|
|
495
|
+
</div>
|
|
496
|
+
</>
|
|
497
|
+
) : (
|
|
498
|
+
<div className="text-xs" style={{ color: "#a1a1aa" }}>
|
|
499
|
+
Nothing is looked up until the caller is identified.
|
|
500
|
+
</div>
|
|
501
|
+
)}
|
|
502
|
+
</Panel>
|
|
503
|
+
|
|
504
|
+
{view.customer && (
|
|
505
|
+
<Panel title="Payment methods">
|
|
506
|
+
{view.customer.paymentMethods.map((method) => (
|
|
507
|
+
<MethodRow key={method.id} method={method} />
|
|
508
|
+
))}
|
|
509
|
+
</Panel>
|
|
510
|
+
)}
|
|
511
|
+
|
|
512
|
+
{view.orders.length > 0 && (
|
|
513
|
+
<Panel title={`Orders (${view.orders.length})`}>
|
|
514
|
+
{view.orders.map((order) => (
|
|
515
|
+
<OrderCard
|
|
516
|
+
key={order.orderId}
|
|
517
|
+
order={order}
|
|
518
|
+
focused={order.orderId === view.focus.orderId}
|
|
519
|
+
/>
|
|
520
|
+
))}
|
|
521
|
+
</Panel>
|
|
522
|
+
)}
|
|
523
|
+
|
|
524
|
+
{view.swapOptions.length > 0 && (
|
|
525
|
+
<Panel title={`Swap options · ${view.focus.orderId ?? ""}`}>
|
|
526
|
+
{view.swapOptions.map((option) => (
|
|
527
|
+
<SwapOptions key={option.itemId} option={option} />
|
|
528
|
+
))}
|
|
529
|
+
</Panel>
|
|
530
|
+
)}
|
|
531
|
+
|
|
532
|
+
<Panel title="You can say">
|
|
533
|
+
{view.scriptBullets.map((bullet) => (
|
|
534
|
+
<div
|
|
535
|
+
key={bullet}
|
|
536
|
+
className="text-[11px] leading-relaxed mb-1"
|
|
537
|
+
style={{ color: "#3f3f46" }}
|
|
538
|
+
>
|
|
539
|
+
· {bullet}
|
|
540
|
+
</div>
|
|
541
|
+
))}
|
|
542
|
+
</Panel>
|
|
543
|
+
</div>
|
|
544
|
+
</div>
|
|
545
|
+
|
|
546
|
+
{/* The footer strip. `callSeq` is monotonic, so this moves on EVERY tool
|
|
547
|
+
call — including a repeated read that changed nothing else. */}
|
|
548
|
+
<div
|
|
549
|
+
className="flex items-center justify-between px-5 py-2 text-[10px] shrink-0"
|
|
550
|
+
style={{ background: "#ffffff", borderTop: "1px solid #e4e4e7", color: "#71717a" }}
|
|
551
|
+
>
|
|
552
|
+
<span className="truncate">
|
|
553
|
+
{lastAction ? (
|
|
554
|
+
<>
|
|
555
|
+
<span style={{ color: "#2563eb" }}>{lastAction.tool}</span> — {lastAction.summary}
|
|
556
|
+
</>
|
|
557
|
+
) : (
|
|
558
|
+
"No tool calls yet"
|
|
559
|
+
)}
|
|
560
|
+
</span>
|
|
561
|
+
<span className="tabular-nums whitespace-nowrap ml-3">
|
|
562
|
+
{view.callSeq} {plural(view.callSeq, "call")}
|
|
563
|
+
</span>
|
|
564
|
+
</div>
|
|
565
|
+
</div>
|
|
566
|
+
</>
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
mountClient({
|
|
571
|
+
component: App,
|
|
572
|
+
theme: {
|
|
573
|
+
bg: "#f4f4f5",
|
|
574
|
+
primary: "#2563eb",
|
|
575
|
+
text: "#18181b",
|
|
576
|
+
surface: "#ffffff",
|
|
577
|
+
border: "#e4e4e7",
|
|
578
|
+
},
|
|
579
|
+
});
|