mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING]: removed display_name, renamed context_providers, middleware and AggregateContextProvider (#3139)
* removed display_name, renamed context_providers, middleware and AggregateContextProvider * fixes * fixed test * testfix * removed mistakenly put back test * updated new test * rename middlewares to middleware * middleware fixes
This commit is contained in:
committed by
GitHub
Unverified
parent
ef44fb4960
commit
203fb7b1c4
+8
-12
@@ -179,10 +179,10 @@ export function AgentDetailsModal({
|
||||
</DetailCard>
|
||||
)}
|
||||
|
||||
{/* Middleware */}
|
||||
{/* Middlewares */}
|
||||
{agent.middleware && agent.middleware.length > 0 && (
|
||||
<DetailCard
|
||||
title={`Middleware (${agent.middleware.length})`}
|
||||
title={`Middlewares (${agent.middleware.length})`}
|
||||
icon={<Package className="h-4 w-4 text-muted-foreground" />}
|
||||
>
|
||||
<ul className="space-y-1">
|
||||
@@ -195,20 +195,16 @@ export function AgentDetailsModal({
|
||||
</DetailCard>
|
||||
)}
|
||||
|
||||
{/* Context Providers */}
|
||||
{agent.context_providers && agent.context_providers.length > 0 && (
|
||||
{/* Context Provider */}
|
||||
{agent.context_provider && (
|
||||
<DetailCard
|
||||
title={`Context Providers (${agent.context_providers.length})`}
|
||||
title="Context Provider"
|
||||
icon={<Database className="h-4 w-4 text-muted-foreground" />}
|
||||
className={!agent.middleware || agent.middleware.length === 0 ? "md:col-start-2" : ""}
|
||||
>
|
||||
<ul className="space-y-1">
|
||||
{agent.context_providers.map((cp, index) => (
|
||||
<li key={index} className="font-mono text-xs text-foreground">
|
||||
• {cp}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<div className="font-mono text-xs text-foreground">
|
||||
{agent.context_provider}
|
||||
</div>
|
||||
</DetailCard>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@ interface BackendEntityInfo {
|
||||
instructions?: string;
|
||||
model_id?: string;
|
||||
chat_client_type?: string;
|
||||
context_providers?: string[];
|
||||
context_provider?: string[];
|
||||
middleware?: string[];
|
||||
// Workflow-specific fields (present when type === "workflow")
|
||||
executors?: string[];
|
||||
@@ -77,7 +77,7 @@ const MAX_RETRY_ATTEMPTS = 10; // Max 10 retries (~30 seconds with exponential b
|
||||
function getBackendUrl(): string {
|
||||
const stored = localStorage.getItem("devui_backend_url");
|
||||
if (stored) return stored;
|
||||
|
||||
|
||||
return DEFAULT_API_BASE_URL;
|
||||
}
|
||||
|
||||
@@ -221,13 +221,13 @@ class ApiClient {
|
||||
instructions: entity.instructions,
|
||||
model_id: entity.model_id,
|
||||
chat_client_type: entity.chat_client_type,
|
||||
context_providers: entity.context_providers,
|
||||
context_provider: entity.context_provider,
|
||||
middleware: entity.middleware,
|
||||
};
|
||||
} else {
|
||||
// Workflow - prefer executors field, fall back to tools for backward compatibility
|
||||
const executorList = entity.executors || entity.tools || [];
|
||||
|
||||
|
||||
// Determine start_executor_id: use entity value, or first executor if it's a string
|
||||
let startExecutorId = entity.start_executor_id || "";
|
||||
if (!startExecutorId && executorList.length > 0) {
|
||||
@@ -236,7 +236,7 @@ class ApiClient {
|
||||
startExecutorId = firstExecutor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
id: entity.id,
|
||||
name: entity.name,
|
||||
@@ -493,10 +493,10 @@ class ApiClient {
|
||||
if (!resumeResponseId) {
|
||||
currentResponseId = storedState.responseId;
|
||||
}
|
||||
|
||||
|
||||
lastSequenceNumber = storedState.lastSequenceNumber;
|
||||
lastMessageId = storedState.lastMessageId;
|
||||
|
||||
|
||||
// Replay stored events only if we're not explicitly resuming
|
||||
// (explicit resume means the caller already has the events)
|
||||
if (!resumeResponseId) {
|
||||
|
||||
@@ -39,8 +39,8 @@ export interface AgentInfo {
|
||||
instructions?: string;
|
||||
model_id?: string;
|
||||
chat_client_type?: string;
|
||||
context_providers?: string[];
|
||||
middleware?: string[];
|
||||
context_provider?: string | undefined;
|
||||
middleware?: string[] | undefined;
|
||||
}
|
||||
|
||||
// JSON Schema types for workflow input
|
||||
|
||||
Reference in New Issue
Block a user