mirror of
https://github.com/nocobase/nocobase.git
synced 2026-12-06 22:23:41 +08:00
* feat(agents): add Chat Agents for model service chat models A Chat Agent is one chat model of a model service, added on the Agent page. Chat panel conversations answer only through a usable Chat Agent, which sets the model, the thinking level, web search and the team's default skills. Conversations whose agent is gone stay readable but cannot continue. A migration adds a Chat Agent for each enabled chat model. Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply> * feat(agents): pick Chat Agents by name in the chat panel The panel lists the Chat Agents the person may use in one flat list, with no thinking level to choose: each agent brings its own. Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply> * feat(agents): show Chat and Coding Agents on one Agent page The Agent page lists both kinds in one table with a type filter, search and a source column. Adding an agent starts by choosing its type: a Chat Agent takes a model provider's chat models and what each is good at, a Coding Agent opens the available models drawer. Editing is one settings page with a read-only source, web search for Chat Agents and three permission levels for Coding Agents; Chat Agents can be deleted. The team default setting and the Lead Agent wording are gone from the page. Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply> * fix(agents): store Chat Agent migration values as JSON, and document Chat Agents The migration passed JSON text to JSON columns, which stored them encoded twice; it now passes the values. Adds the Chat Agents documentation, the README pointers and the changeset. Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply> * test(agents): cover Chat Agents in the core scenarios Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply> * fix(agents): describe the two agent kinds by what they can do A Chat Agent answers questions, looks up data and takes business actions within permissions, such as configuring approval drafts; a Coding Agent reads and writes files, runs commands and runs tests in a project directory. Drops the 'cannot change code', 'handles approvals' and 'answers in seconds' wording. Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply> * style(agents): format Chat Agent sources with Prettier * fix(agents): complete Chat Agent plural forms and add Chat Agents in the examples tests Spanish, French and Portuguese need a `many` plural form for the new "selected" and "added" counts. The examples template's chat tests now add a Chat Agent for their fixture model, since chat-panel conversations answer only through one and carry its default-skills scope. * test(agents): add Chat Agents in the examples browser tests The chat panel answers only through Chat Agents and starts a new chat with the first one, so the browser tests add a Chat Agent for their fixture models, remove it again afterwards, and expect web search to be available without picking a model first. The thinking picker test is removed: the panel no longer offers a per-chat thinking level, which is now a Chat Agent setting. * fix(ui-library): sync the agent chat block and picker with Chat Agents Regenerate registry/agents/agent-chat from the agents plugin's panel, and give the agent-picker item the flat list of Chat Agents its plugin copy already has, so the UI Library matches the chat panel again. * feat(agents): add Chat and Coding Agents by checking models in one drawer (#11915) * feat(agents): make what an agent is good at optional when adding and enabling * feat(agents): add agents by checking models in one accordion drawer * feat(agents): split the add-agent source hooks and translate the add drawer * feat(agents): finish the add drawer, scenarios, docs and the examples browser test * fix(agents): add from the model catalog without service rights, read every model page, detect tools again and tell tool problems apart * fix(agents): detect again when a runtime found no tools, name the machines to sign in on and sum up connection results by their real problem * fix(agents): name only the runtimes a tool's sign-in command applies to * feat(agents): drop the Good at column from the Agents list * chore(agents): drop the wording the removed drawer and good-at check left unused * feat(agents): list every source in the add drawer, with added models locked in place and fixes on top Each model service or coding tool is one section in its own order. A model that already has an agent stays in its source, checked and locked, linking to that agent; a source that cannot be used now shows why and its fix above its models, which cannot be checked. The separate Unavailable and Added sections are gone. * fix(agents): grey out added models, label tool problems by their fix, and keep the scenarios and browser test in step A locked, added model reads apart from one checked to add; a tool's header names what fixes it (such as Needs sign-in); a source without models shows no count. The Examples browser test checks that an added model stays in its service, checked and locked, and the Agents scenarios describe the per-source layout. * fix(agents): list a blocked tool's reported models, keep source states on phones, and open sources whose models arrive mid-search A coding tool that is not signed in lists the models its runtimes reported, still locked; the Connected, Available and All added tags stay visible at phone width; a source with no models is no longer marked All added; and a search opens every matching source on each render, so models that arrive after typing open theirs. * fix(agents): read a blocked tool's models from each runtime's own report The runtime list carries no models, so the drawer reads each runtime that offers a tool that cannot be used now, as the tool's fix already does. * feat(agents): manage agents from the list row menu * docs(agents): describe the list menu and status filters * feat(agents): enable a disabled agent again from Add agent A model whose agent is enabled stays checked and locked in its source. One whose agent was disabled can now be checked: adding enables that agent with its name, what it is good at and other settings kept, instead of creating a second agent. The submit button, the selection summary and the result count new agents and enabled ones apart, a source counts its disabled agents, and it is all added only when every model has an enabled agent. * test(agents): cover enabling disabled agents from Add agent The Examples browser test enables a disabled Chat Agent while adding a new model, then a disabled Coding Agent alone on a phone, and checks both keep their name and good-at text. The core scenarios describe the new path. * feat(agents): describe Chat and Coding Agents by what they do The page, the type cards, the source in agent settings and the empty-state forms now say what each kind of agent does and what it needs, and Chinese text says API 密钥 throughout. The Usage page names the agent types Chat and Coding, the labels the Agents list uses. Unused strings are removed from every language: the old page description, empty state and how-to-add text, and the agentTypes group the Usage page no longer reads. * fix(agents): judge each coding model by its own runtimes, and open disabled agents from unusable sources A coding tool can be ready on one runtime while a model of it is offered by none. Such a model stays listed for its agent but cannot be checked, selected all, counted or submitted, so a disabled agent is not enabled where nothing can run it; its row says Unavailable now. A source reads All added only when every model has an enabled agent. In a source that cannot be used now, a disabled agent's name opens its settings, as it does in a usable source. * test(agents): cover disabled agents that cannot run now in Add agent The Examples browser test keeps a disabled Coding Agent whose model no runtime offers now from being checked while another model of the tool is online, and opens a disabled Chat Agent from a turned-off model service. The core scenario describes both. * feat(agents): add a chat model by its id in Add agent Who manages model services can type a model id below a service's models, or add a search that matched nothing to a service of choice. The model is listed checked and joins the service only when it is added. Anyone else is told to ask an administrator, and the server already refuses both the service change and a Chat Agent for a model the service does not offer. * test(agents): cover adding a chat model by its id, and document it * fix(agents): check a Coding model is still offered when adding it The drawer judged availability from the rows it opened with, so a disabled Coding Agent checked before its only runtime was revoked was still enabled. Adding now reads the chosen tools' models again, leaves a model no runtime offers as it was, and refreshes the drawer so it drops out of the selection. * fix(agents): report a tool that could not be read again without throwing a non-error * test(agents): cover a runtime revoked after its disabled Coding Agent was checked * fix(agents): keep models added meanwhile, and connect a provider without a model list by a model id Adding Chat Agents sent the service's whole model list as the drawer last read it, so a second drawer dropped the models the first had added. Updating a service now takes addModels, merged into what it offers when it updates, and the drawer sends only the new ids. A provider with no model list could not be connected from the drawer. When listing fails, a model id can be given instead: the service is saved only once that model answers with the key, and the id is listed checked. * test(agents): cover two drawers adding to one service and a provider without a model list * fix(agents): lock a model service before merging models added at the same moment Two updates adding models to one service both read its models before either wrote, so the later write dropped what the earlier one added. An update now locks the service's row before reading it. A PostgreSQL test holds the row while both updates queue behind it and checks that both models are kept; the database matrix runs it when the service code changes. * feat(agents): add Chat Agents for newly checked chat models when saving a model service (#11918) * feat(agents): add Chat Agents for newly checked chat models when saving a model service * test(agents): cover adding Chat Agents when saving a model service, and document it * chore(agents): run checks against the stacked v3 base * feat(agents): add Chat Agents through the model service save itself * test(agents): cover adding Chat Agents through the save, a slow agent list and a retry whose answer was lost * fix(agents): count only the models an update added under its lock, and complete plural forms * test: complete the Add agent drawer's plural forms and expect the model service race suite --------- Co-authored-by: chenos <2993310+chenos@users.noreply.github.com> --------- Co-authored-by: chenos <2993310+chenos@users.noreply.github.com> * fix(agents): say when a chat's Chat Agent is no longer available A chat-panel conversation answers only through a Chat Agent the person may use, and the server refuses to continue one whose agent was deleted or turned off. The panel showed only the generic "The response failed" after the attempt. It now tells from the Chat Agents it already lists that the conversation's agent is gone, shows that the conversation can be read but not continued, and does not send. Conversations whose models an application's scope chose are left as they are. * feat(agents): say why an agent is unavailable now in a tooltip The Agents list's "Unavailable now" tag used a native title for Coding Agents and nothing for Chat Agents. It now opens a tooltip on hover, keyboard focus or tap that names the reason and where to fix it: the model not checked as a chat model in its service, the service turned off, without an API key or deleted, or no runtime online. The Source column and the agent settings give the same reason in short. The agent list adds `serviceProblem` (gone, off, noKey) beside `unusable: 'serviceUnavailable'`, so the reasons a Chat Agent's service cannot answer are told apart without changing the existing values. * docs(agents): cover Chat Agents in the plugin Skill The Skill described only Coding Agents and said model services serve only the App's own model calls. It now says the chat panel answers only through Chat Agents, how to add them by API or when saving a model service, how they are edited, disabled and deleted, what the upgrade migration adds, and why an agent shows "Unavailable now" and where to fix it, linking to the README and docs/chat-agents.md. * fix(agents): keep Chat Agent settings and read-only chats when switching Switching a panel conversation to another Chat Agent kept the previous agent's web search and thinking level: the server only checked that the new agent was usable. It now applies the new agent's thinking level, unless the change names one, and turns web search off when the agent does not allow it, on configuration changes and on messages sent with a model. A conversation whose Chat Agent is gone could be reopened by choosing another model. The server now checks the conversation's own agent before the one it switches to, and the panel disables the model picker. Creating a panel conversation whose scope gives its models chose the default Chat Agent's model and was refused as outside the scope. A scope that gives the models now decides, as it already did for later messages. * fix(ui-library): sync the agent chat panel with the Chat Agent switching fix Regenerates registry/agents/agent-chat/conversation-view.tsx from the agents plugin's panel, which now disables the model picker in a conversation whose Chat Agent is gone and leaves the thinking level to the agent switched to. * docs(agents): say in the README that Chat Agents use model services The Model services section still said agents do not use model services, which contradicted Chat Agents: the chat panel answers through them. Coding Agents run on runtimes and are the ones that do not. * fix(app-plugin-table-views): preserve newer edits while settings are saving --------- Co-authored-by: chenos <2993310+chenos@users.noreply.github.com> Co-authored-by: Claude · Opus 5.5 <agent+runner-claude-0341b1a9e7edd8d51fb2@studio.noreply>