open-swe/apps/web/src/lib/langchain-messages.ts
Brace Sproul ff8a0f7167
[WIP] feat: New multi agent GitHub based workflow (#175)
* feat: New multi agent GitHub based workflow

* fix: read plan from gh issue in init issue node

* format

* cr

* fix how new planner threads are started, allow for creating new issues

* fix: read tasks from gh issue inside manager when taking any action

* cr

* update planner

* feat: port intrerrupt node to planner

* add interrupt routing in graph

* update programmer nodes and state

* read messages from issue in programmer

* lint fix

* tag issue when opening PR

* better pr title and body generation prompts

* start runs from planner interrupt and update issue with task plan

* fix lg server build issues

* cr

* fix cloning and pushing

* cr

* cr

* feat: v0 copy (#194)

* feat: v0 copy

* cr

* all pages 'working'

* cr

* cr

* cr

* cr
2025-06-18 11:03:39 -07:00

18 lines
384 B
TypeScript

import {
AIMessage,
HumanMessage,
Message,
ToolMessage,
} from "@langchain/langgraph-sdk";
export function isAIMessageSDK(m: Message): m is AIMessage {
return m.type === "ai";
}
export function isToolMessageSDK(m: Message): m is ToolMessage {
return m.type === "tool";
}
export function isHumanMessageSDK(m: Message): m is HumanMessage {
return m.type === "human";
}