mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-04 14:52:12 +00:00
fix: authentication bugs and example (#643)
* fix: fix authentication bugs and example * fix: formatting * fix: move items
This commit is contained in:
parent
041cb4aca6
commit
857053ad95
3 changed files with 15 additions and 5 deletions
|
|
@ -11,4 +11,7 @@ GITHUB_CALLBACK_URL=""
|
||||||
GITHUB_LOGIN_URL=""
|
GITHUB_LOGIN_URL=""
|
||||||
GITHUB_ACCESS_TOKEN_LOGIN_LINK=
|
GITHUB_ACCESS_TOKEN_LOGIN_LINK=
|
||||||
|
|
||||||
SECRETS_ENCRYPTION_KEY=""
|
SECRETS_ENCRYPTION_KEY=""
|
||||||
|
|
||||||
|
OPEN_SWE_LOCAL_MODE=true
|
||||||
|
OPEN_SWE_LOCAL_PROJECT_PATH=""
|
||||||
|
|
@ -52,4 +52,7 @@ OPEN_SWE_APP_URL="http://localhost:3000"
|
||||||
SECRETS_ENCRYPTION_KEY=""
|
SECRETS_ENCRYPTION_KEY=""
|
||||||
# Whether or not to append the string "[skip ci]" to the commit message.
|
# Whether or not to append the string "[skip ci]" to the commit message.
|
||||||
# See the documentation for how to set this up: docs.langchain.com/labs/swe/setup/ci#skip-ci-until-last-commit
|
# See the documentation for how to set this up: docs.langchain.com/labs/swe/setup/ci#skip-ci-until-last-commit
|
||||||
SKIP_CI_UNTIL_LAST_COMMIT="true"
|
SKIP_CI_UNTIL_LAST_COMMIT="true"
|
||||||
|
|
||||||
|
OPEN_SWE_LOCAL_MODE=true
|
||||||
|
OPEN_SWE_LOCAL_PROJECT_PATH=""
|
||||||
|
|
@ -45,6 +45,7 @@ import { isLocalMode } from "@open-swe/shared/open-swe/local-mode";
|
||||||
import { Thread } from "@langchain/langgraph-sdk";
|
import { Thread } from "@langchain/langgraph-sdk";
|
||||||
import { PlannerGraphState } from "@open-swe/shared/open-swe/planner/types";
|
import { PlannerGraphState } from "@open-swe/shared/open-swe/planner/types";
|
||||||
import { GraphState } from "@open-swe/shared/open-swe/types";
|
import { GraphState } from "@open-swe/shared/open-swe/types";
|
||||||
|
import { Client } from "@langchain/langgraph-sdk";
|
||||||
const logger = createLogger(LogLevel.INFO, "ClassifyMessage");
|
const logger = createLogger(LogLevel.INFO, "ClassifyMessage");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -64,11 +65,14 @@ export async function classifyMessage(
|
||||||
|
|
||||||
let plannerThread: Thread<PlannerGraphState> | undefined;
|
let plannerThread: Thread<PlannerGraphState> | undefined;
|
||||||
let programmerThread: Thread<GraphState> | undefined;
|
let programmerThread: Thread<GraphState> | undefined;
|
||||||
const langGraphClient = createLangGraphClient({
|
let langGraphClient: Client | undefined;
|
||||||
defaultHeaders: getDefaultHeaders(config),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!isLocalMode(config)) {
|
if (!isLocalMode(config)) {
|
||||||
|
// Only create LangGraph client if not in local mode
|
||||||
|
langGraphClient = createLangGraphClient({
|
||||||
|
defaultHeaders: getDefaultHeaders(config),
|
||||||
|
});
|
||||||
|
|
||||||
plannerThread = state.plannerSession?.threadId
|
plannerThread = state.plannerSession?.threadId
|
||||||
? await langGraphClient.threads.get(state.plannerSession.threadId)
|
? await langGraphClient.threads.get(state.plannerSession.threadId)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue