mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 09:13:14 +00:00
chore: Stop passing metadata obj when invoking runs (#649)
This commit is contained in:
parent
6433ed30e0
commit
4c75eca3f9
9 changed files with 0 additions and 64 deletions
|
|
@ -234,11 +234,6 @@ const App: React.FC = () => {
|
|||
};
|
||||
await client.runs.create(threadId, MANAGER_GRAPH_ID, {
|
||||
input: interruptInput,
|
||||
metadata: {
|
||||
source: "cli:resume_interrupt",
|
||||
owner,
|
||||
repo: repoName,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -255,11 +255,6 @@ export class StreamingService {
|
|||
|
||||
const run = await newClient.runs.create(threadId, MANAGER_GRAPH_ID, {
|
||||
input: runInput,
|
||||
metadata: {
|
||||
source: "cli:start_manager",
|
||||
owner: runInput.targetRepository?.owner,
|
||||
repo: runInput.targetRepository?.repo,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -300,11 +300,6 @@ export async function classifyMessage(
|
|||
command: {
|
||||
resume: plannerResume,
|
||||
},
|
||||
metadata: {
|
||||
source: "manager:classify_message_resume_planner",
|
||||
owner: state.targetRepository?.owner,
|
||||
repo: state.targetRepository?.repo,
|
||||
},
|
||||
streamMode: OPEN_SWE_STREAM_MODE as StreamMode[],
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -90,11 +90,6 @@ ${ISSUE_CONTENT_CLOSE_TAG}`,
|
|||
update: commandUpdate,
|
||||
goto: "start-planner",
|
||||
},
|
||||
metadata: {
|
||||
source: "manager:create_new_session",
|
||||
owner: state.targetRepository?.owner,
|
||||
repo: state.targetRepository?.repo,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
configurable: getCustomConfigurableFields(config),
|
||||
|
|
|
|||
|
|
@ -63,11 +63,6 @@ export async function startPlanner(
|
|||
PLANNER_GRAPH_ID,
|
||||
{
|
||||
input: runInput,
|
||||
metadata: {
|
||||
source: "manager:start_planner",
|
||||
owner: state.targetRepository?.owner,
|
||||
repo: state.targetRepository?.repo,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
configurable: getCustomConfigurableFields(config),
|
||||
|
|
|
|||
|
|
@ -114,11 +114,6 @@ async function startProgrammerRun(input: {
|
|||
PROGRAMMER_GRAPH_ID,
|
||||
{
|
||||
input: runInput,
|
||||
metadata: {
|
||||
source: "planner:proposed_plan",
|
||||
owner: state.targetRepository?.owner,
|
||||
repo: state.targetRepository?.repo,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
configurable: getCustomConfigurableFields(config),
|
||||
|
|
|
|||
|
|
@ -190,11 +190,6 @@ webhooks.on("issues.labeled", async ({ payload }) => {
|
|||
const run = await langGraphClient.runs.create(threadId, MANAGER_GRAPH_ID, {
|
||||
input: runInput,
|
||||
config,
|
||||
metadata: {
|
||||
source: "github_webhook:issue_label",
|
||||
owner: issueData.owner,
|
||||
repo: issueData.repo,
|
||||
},
|
||||
ifNotExists: "create",
|
||||
streamResumable: true,
|
||||
streamMode: OPEN_SWE_STREAM_MODE as StreamMode[],
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
import { parsePartialJson } from "@langchain/core/output_parsers";
|
||||
import {
|
||||
AIMessage,
|
||||
Checkpoint,
|
||||
Message,
|
||||
StreamMode,
|
||||
ToolMessage,
|
||||
} from "@langchain/langgraph-sdk";
|
||||
import { getContentString } from "../utils";
|
||||
import { BranchSwitcher, CommandBar } from "./shared";
|
||||
import { MarkdownText } from "../markdown-text";
|
||||
import {
|
||||
LoadExternalComponent,
|
||||
UIMessage,
|
||||
} from "@langchain/langgraph-sdk/react-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { ToolCalls, ToolResult } from "./tool-calls";
|
||||
import { MessageContentComplex } from "@langchain/core/messages";
|
||||
import { Fragment } from "react/jsx-runtime";
|
||||
|
|
@ -345,19 +342,6 @@ export function mapToolMessageToActionStepProps(
|
|||
};
|
||||
}
|
||||
|
||||
const attemptParseOwnerRepo = (repoQueryParam: string) => {
|
||||
try {
|
||||
if (!repoQueryParam || !repoQueryParam.includes("/")) {
|
||||
return undefined;
|
||||
}
|
||||
const [owner, repo] = repoQueryParam.split("/");
|
||||
return { owner, repo };
|
||||
} catch {
|
||||
// no-op
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
export function AssistantMessage({
|
||||
message,
|
||||
threadId,
|
||||
|
|
@ -377,7 +361,6 @@ export function AssistantMessage({
|
|||
modifyRunId?: (runId: string) => Promise<void>;
|
||||
requestHelpEvents?: CustomNodeEvent[];
|
||||
}) {
|
||||
const [repo] = useQueryState("repo");
|
||||
const content = message?.content ?? [];
|
||||
|
||||
const handleHumanHelpResponse = async (response: string) => {
|
||||
|
|
@ -388,15 +371,8 @@ export function AssistantMessage({
|
|||
},
|
||||
];
|
||||
|
||||
const ownerRepo = attemptParseOwnerRepo(repo ?? "");
|
||||
|
||||
const newRun = await thread.client.runs.create(threadId, assistantId, {
|
||||
command: { resume: humanResponse },
|
||||
metadata: {
|
||||
source: "web:interrupt_response",
|
||||
owner: ownerRepo?.owner,
|
||||
repo: ownerRepo?.repo,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -96,11 +96,6 @@ export function TerminalInput({
|
|||
MANAGER_GRAPH_ID,
|
||||
{
|
||||
input: runInput,
|
||||
metadata: {
|
||||
source: "web:start_manager",
|
||||
owner: selectedRepository.owner,
|
||||
repo: selectedRepository.repo,
|
||||
},
|
||||
config: {
|
||||
recursion_limit: 400,
|
||||
configurable: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue