graphId={PLANNER_GRAPH_ID}
- threadId={plannerThreadId}
- runId={plannerRunId}
+ threadId={plannerSession.threadId}
+ runId={plannerSession.runId}
setProgrammerSession={setProgrammerSession}
programmerSession={programmerSession}
setSelectedTab={setSelectedTab}
@@ -223,7 +239,7 @@ export function ThreadView({
}}
/>
)}
- {!(plannerThreadId && plannerRunId) && (
+ {!plannerSession && (
diff --git a/packages/shared/src/open-swe/types.ts b/packages/shared/src/open-swe/types.ts
index 377b0fd9..7ecf7c1a 100644
--- a/packages/shared/src/open-swe/types.ts
+++ b/packages/shared/src/open-swe/types.ts
@@ -364,6 +364,14 @@ export const GraphConfigurationMetadata: {
"The maximum number of tokens to generate in an individual LLM call. Increasing/decreasing this number _will_ effect how many tokens are generated by the model. It will _not_ simply cut off the generation after the specified number of tokens is reached.",
},
},
+ mcpServers: {
+ x_open_swe_ui_config: {
+ type: "json",
+ default: JSON.stringify(DEFAULT_MCP_SERVERS, null, 2),
+ description:
+ "JSON configuration for custom MCP servers. LangGraph docs server is set by default. See the `mcpServers` field of the LangChain MCP Adapters `ClientConfig` type for information on this schema. [Documentation here](https://v03.api.js.langchain.com/types/_langchain_mcp_adapters.ClientConfig.html).",
+ },
+ },
[GITHUB_TOKEN_COOKIE]: {
x_open_swe_ui_config: {
type: "hidden",
@@ -394,17 +402,31 @@ export const GraphConfigurationMetadata: {
type: "hidden",
},
},
- mcpServers: {
+ thread_id: {
x_open_swe_ui_config: {
- type: "json",
- default: JSON.stringify(DEFAULT_MCP_SERVERS, null, 2),
- description:
- "JSON configuration for custom MCP servers. LangGraph docs server is set by default. See the `mcpServers` field of the LangChain MCP Adapters `ClientConfig` type for information on this schema. [Documentation here](https://v03.api.js.langchain.com/types/_langchain_mcp_adapters.ClientConfig.html).",
+ type: "hidden",
+ },
+ },
+ run_id: {
+ x_open_swe_ui_config: {
+ type: "hidden",
},
},
};
export const GraphConfiguration = z.object({
+ /**
+ * The thread ID, generated by the manager graph.
+ */
+ thread_id: withLangGraph(z.string().optional(), {
+ metadata: GraphConfigurationMetadata.thread_id,
+ }),
+ /**
+ * The run ID, generated by the manager graph.
+ */
+ run_id: withLangGraph(z.string().optional(), {
+ metadata: GraphConfigurationMetadata.run_id,
+ }),
/**
* The maximum number of context gathering actions to take during planning.
* Each action consists of 2 messages (request & result), plus 1 human message.