Skip to content

CDS example with agent chat#5

Open
misham wants to merge 4 commits intomainfrom
misham/cds-agent
Open

CDS example with agent chat#5
misham wants to merge 4 commits intomainfrom
misham/cds-agent

Conversation

@misham
Copy link
Collaborator

@misham misham commented Mar 10, 2026

@misham misham requested a review from kerbearasaurus March 10, 2026 06:01
misham added 3 commits March 9, 2026 23:02
Migrate authentication from username/password to OAuth client credentials
flow with token caching. Add new CDS mode for appointment preparation
with FHIR patient data integration, agent creation UI, markdown rendering,
and dedicated CDS pipeline/state management. Include vitest setup and
initial tests.
- Add patientId to buildCdsMessage so it's included in the first message
- Wire patientId through useCdsPipeline into the message builder
- Replace manual OAuth token cache in agent.ts with SDK-native
  authProvider.getToken() to eliminate the redundant /v2/auth/token call
- Update tests to cover patientId in message construction
Add ToolCall/TraceData types, session trace fetching APIs
(fetchSessionTraces, fetchAllChatMessages), SET_TRACES reducer action,
CDS-specific chat components with trace display (AgentTrace,
CdsChatBubble, CdsChatMessages), and a standalone debug window
accessible from the CDS view header.
@misham misham force-pushed the misham/cds-agent branch from 0d4e6e1 to 4b1606b Compare March 10, 2026 22:22
- Auto-trigger appointment summary when agent is selected with a patient
- Extract processStream helper to deduplicate stream handling logic
- Add effect cleanup to abort auto-summary on unmount
- Add loading and error-during-loading UI states with retry
- Add SuggestedPrompts component with CDS-specific prompts
- Move prompt constants to cdsPrompt.ts
- Only prepend system prompt on first message (isFirstMessage flag)
- Remove cdsAgentPrompt from config and settings UI
- Remove debug console.log/warn statements from agent.ts and fhir.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant