Replace manual HTTP proxy in ChatController with Semantic Kernel's OpenAI chat completion service pointed at CLIProxyAPI. Add extraction plugin with validation function for structured field extraction from natural language, enabling an agentic loop with auto-retry and human-in-the-loop escalation. - Add Microsoft.SemanticKernel 1.74.0 with OpenAI connector - Create ExtractedFields schema and ValidationResult models - Create ExtractionPlugin with [KernelFunction] validation - Rewrite ChatController to use IChatCompletionService streaming - Configure FunctionChoiceBehavior.Auto() for tool calling - Preserve existing SSE contract (client unchanged) - Update tests to mock SK services, add plugin and integration tests - Archive multi-turn-conversations and migrate-to-semantic-kernel changes - Sync specs for agent-extraction, semantic-kernel-integration, chat-streaming Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
910 B
Markdown
22 lines
910 B
Markdown
## Why
|
|
|
|
Each chat request currently sends only the latest user message, so the AI has no memory of previous exchanges within the same session. Users expect the assistant to remember context from earlier in the conversation, like ChatGPT/Gemini do.
|
|
|
|
## What Changes
|
|
|
|
- Send the full conversation history (all prior user and assistant messages) with each API request instead of just the latest user message
|
|
- The backend already forwards all messages in `ChatRequest.Messages` to the Responses API — no backend changes needed
|
|
- Add a "New Chat" button to clear the conversation and start fresh
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
<!-- None -->
|
|
|
|
### Modified Capabilities
|
|
- `chat-ui`: Send full message history with each request; add a "New Chat" button to reset the conversation
|
|
|
|
## Impact
|
|
|
|
- `src/ChatAgent.Client/Pages/Chat.razor`: Change request construction to include full history; add new chat button
|