feat: expose codex stream delta events
This commit is contained in:
@@ -1547,6 +1547,29 @@ function normalizeDiscoveryThreadLifecycleEventSummary() {
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDiscoveryStreamDeltaEventSummary() {
|
||||
const events = [
|
||||
{ label: "Agent 增量", group: "agent" },
|
||||
{ label: "计划增量", group: "plan" },
|
||||
{ label: "思考新增", group: "reasoning" },
|
||||
{ label: "思考文本", group: "reasoning" },
|
||||
{ label: "原始思考", group: "reasoning" },
|
||||
{ label: "MCP 进度", group: "tool", toolProgress: true },
|
||||
{ label: "命令输出", group: "command" },
|
||||
{ label: "终端交互", group: "command" },
|
||||
{ label: "文件输出", group: "file", fileChangeOutput: true },
|
||||
];
|
||||
return {
|
||||
eventCount: events.length,
|
||||
reasoningDeltaEventCount: events.filter((event) => event.group === "reasoning").length,
|
||||
commandStreamEventCount: events.filter((event) => event.group === "command").length,
|
||||
toolProgressEventAvailable: events.some((event) => event.toolProgress === true),
|
||||
fileChangeOutputEventAvailable: events.some((event) => event.fileChangeOutput === true),
|
||||
notificationOnly: true,
|
||||
labels: events.map((event) => event.label),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDiscoveryPlugins(result) {
|
||||
return asArray(result?.marketplaces)
|
||||
.flatMap((marketplace) => asArray(marketplace?.plugins))
|
||||
@@ -2047,6 +2070,7 @@ export async function discoverCodexAppServerCapabilities(runnerConfig) {
|
||||
runtimeEventSummary: normalizeDiscoveryRuntimeEventSummary(),
|
||||
extensionEventSummary: normalizeDiscoveryExtensionEventSummary(),
|
||||
threadLifecycleEventSummary: normalizeDiscoveryThreadLifecycleEventSummary(),
|
||||
streamDeltaEventSummary: normalizeDiscoveryStreamDeltaEventSummary(),
|
||||
errors: [
|
||||
modelResult?.__bossError ? `model/list:${safeRuntimeDiagnosticText(modelResult.__bossError)}` : undefined,
|
||||
providerCapabilities?.__bossError
|
||||
|
||||
Reference in New Issue
Block a user