feat(AgentsManager): AI Chat tab for natural language task orchestration#498
Draft
feat(AgentsManager): AI Chat tab for natural language task orchestration#498
Conversation
…orchestration - Add AiChatAppService.cs with AI-powered chat endpoint that: - Analyzes user intent using AI with structured Prompt-based responses - Finds suitable existing ChatGroups or suggests creating new ones - Programmatically invokes ChatGroupAppService.SetChatGroup and ChatGroupService.RunChatGroupInThread (FunctionRender pattern) - Runs tasks in background thread (EventBus pattern) - Add AiChatRequest.cs with request models (AiChat_SendMessageRequest, AiChat_SuggestedGroupDto, AiChat_RunExistingGroupRequest) - Add AiChatResponse.cs with response models (AiChat_SendMessageResponse, AiChatResponseType) - Register AiChatAppService in Register.cs - Add AI Chat tab (fourth) to Index.cshtml with chat UI featuring: - Message list with user/AI messages - Confirmation buttons for group creation/task execution - AI model selector - Add AI Chat JavaScript methods in index.js: - sendAiChatMessage() - sends message and handles AI response - confirmCreateAndRunGroup() - confirms group creation and task start - confirmRunExistingGroup() - runs existing group - cancelSuggestion() / clearAiChat() - utility functions - loadAiChatModelList() - loads available AI models - Add AI Chat CSS styles to index.css Agent-Logs-Url: https://github.com/NeuCharFramework/NcfPackageSources/sessions/2b0ded12-8dc2-4c02-8ed9-a726706e8edb Co-authored-by: JeffreySu <2281927+JeffreySu@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NeuCharFramework/NcfPackageSources/sessions/2b0ded12-8dc2-4c02-8ed9-a726706e8edb Co-authored-by: JeffreySu <2281927+JeffreySu@users.noreply.github.com>
…e, fix chat history filter Agent-Logs-Url: https://github.com/NeuCharFramework/NcfPackageSources/sessions/2b0ded12-8dc2-4c02-8ed9-a726706e8edb Co-authored-by: JeffreySu <2281927+JeffreySu@users.noreply.github.com>
Co-authored-by: JeffreySu <2281927+JeffreySu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add language-driven task initiation for AgentsManager
feat(AgentsManager): AI Chat tab for natural language task orchestration
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users need a conversational interface to launch AgentsManager tasks via natural language — if no suitable
ChatGroupexists, the AI proposes creating one (with agent selection and naming), waits for confirmation, then auto-creates and runs the task.Backend —
AiChatAppServiceThree
[ApiBind(Post)]endpoints:SendMessage— Builds a dynamic system prompt injecting all availableAgentTemplateandChatGrouprecords, calls AI, parses structured JSON response into one of:Message | SuggestRunTask | SuggestCreateGroup | TaskStarted | ErrorConfirmCreateAndRunGroup— CallsChatGroupAppService.SetChatGroup()(existing FunctionRender method, not duplicated), then firesChatGroupService.RunChatGroupInThread()in a backgroundTask.Runwith exception loggingRunExistingGroup— Same fire-and-forget pattern for an already-existing groupNew DTOs:
AiChat_SendMessageRequest,AiChat_SuggestedGroupDto,AiChat_RunExistingGroupRequest,AiChat_SendMessageResponse(withAiChatResponseTypeenum).AiChatAppServiceregistered inRegister.cs.Frontend — new "AI 对话" tab (fourth)
task-html-renderer, loading animationSuggestCreateGroupandSuggestRunTaskmessages — hidden after actionKey JS methods added to
index.js:sendAiChatMessage()— posts message + pruned history, handles all response typesconfirmCreateAndRunGroup()/confirmRunExistingGroup()— POST to backend, show success via$message, mark suggestion confirmedloadAiChatModelList()— lazy-loads on tab click viahandleTabsClickCSS chat bubble styles appended to
index.css.Original prompt
Created from VS Code.