Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions ui/cypress/e2e/smoke.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,19 @@ describe('Main page', () => {
cy.contains('h1', 'Agents').should('be.visible');

cy.visit('/agents/new')
cy.contains('h1', 'Create New Agent').should('be.visible');
cy.contains('h1', 'New Agent').should('be.visible');

cy.wait(1000)
cy.visit('/models')
cy.contains('h1', 'Models').should('be.visible');

cy.visit('/models/new')
cy.contains('h1', 'Create New Model').should('be.visible');
cy.contains('h1', 'New Model').should('be.visible');

cy.wait(1000)
cy.visit('/tools')
cy.contains('h1', 'Tools Library').should('be.visible');

cy.wait(1000)
cy.visit('/servers')
cy.contains('h1', 'MCP Servers').should('be.visible');
cy.visit('/mcp')
cy.contains('h1', 'MCP & tools').should('be.visible');
cy.get('#mcp-search').should('be.visible');
})
})

Expand All @@ -64,7 +61,11 @@ describe('Regressions', () => {
cy.visit('/models')
cy.contains('h1', 'Models').should('be.visible');

cy.get('[data-test="edit-model-default/default-model-config"]').should('be.visible').click();
// `model.ref` (e.g. default/default-model-config) is embedded in data-test; use prefix to avoid exact-ref coupling
cy.get('[data-test^="edit-model-"]')
.first()
.should('be.visible')
.click();

cy.contains('h1', 'Edit Model').should('be.visible');
cy.get('[data-test="edit-model-name-button"]').should('be.visible').click();
Expand Down
2 changes: 1 addition & 1 deletion ui/public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* - Please do NOT modify this file.
*/

const PACKAGE_VERSION = '2.12.14'
const PACKAGE_VERSION = '2.13.4'
const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
Expand Down
7 changes: 7 additions & 0 deletions ui/src/app/actions/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
AgentSpec,
BaseResponse,
DeclarativeAgentSpec,
DeclarativeRuntime,
PromptSource,
SandboxAgent,
SkillForAgent,
Expand All @@ -18,6 +19,10 @@ import { isMcpTool } from "@/lib/toolUtils";
import { k8sRefUtils } from "@/lib/k8sUtils";
import { formRowsToGitRepos, type GitSkillFormRow } from "@/lib/agentSkillsForm";

function declarativeRuntimeFromForm(agentFormData: AgentFormData): DeclarativeRuntime {
return agentFormData.declarativeRuntime === "go" ? "go" : "python";
}

function attachPromptTemplateToDeclarative(decl: DeclarativeAgentSpec, agentFormData: AgentFormData) {
if (!agentFormData.promptSources?.some((s) => s.name.trim())) {
return;
Expand Down Expand Up @@ -170,6 +175,7 @@ function fromAgentFormDataToAgent(agentFormData: AgentFormData): Agent {

if (type === "Declarative") {
base.spec!.declarative = {
runtime: declarativeRuntimeFromForm(agentFormData),
systemMessage: agentFormData.systemPrompt || "",
modelConfig: modelConfigName || "",
stream: agentFormData.stream ?? true,
Expand Down Expand Up @@ -337,6 +343,7 @@ function fromAgentFormDataToSandboxAgent(agentFormData: AgentFormData): SandboxA
});

const decl: DeclarativeAgentSpec = {
runtime: declarativeRuntimeFromForm(agentFormData),
systemMessage: agentFormData.systemPrompt || "",
modelConfig: modelConfigName || "",
stream: agentFormData.stream ?? true,
Expand Down
6 changes: 4 additions & 2 deletions ui/src/app/actions/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export async function deleteServer(serverName: string): Promise<BaseResponse<voi
method: "DELETE",
});

revalidatePath("/servers");
revalidatePath("/mcp");
revalidatePath("/mcp/new");
return {
message: "MCP server deleted successfully",
};
Expand All @@ -60,7 +61,8 @@ export async function createServer(serverData: ToolServerCreateRequest): Promise
body: JSON.stringify(serverData),
});

revalidatePath("/servers");
revalidatePath("/mcp");
revalidatePath("/mcp/new");
return response;
} catch (error) {
return createErrorResponse<RemoteMCPServer | MCPServer>(error, "Error creating MCP server");
Expand Down
12 changes: 10 additions & 2 deletions ui/src/app/agents/[namespace]/[name]/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,16 @@ export default function ChatAgentPage({ params }: { params: Promise<{ name: stri

if (gate === "loading") {
return (
<div className="flex items-center justify-center min-h-[50vh] w-full">
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
<div
className="flex min-h-[50vh] w-full items-center justify-center"
role="status"
aria-live="polite"
aria-busy="true"
>
<div className="flex flex-col items-center gap-2">
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" aria-hidden />
<span className="sr-only">Preparing chat…</span>
</div>
</div>
);
}
Expand Down
Loading
Loading