mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-17 15:10:27 +00:00
26 lines
673 B
TypeScript
26 lines
673 B
TypeScript
import { Annotation } from "@langchain/langgraph";
|
|
import { BaseMessage } from "@langchain/core/messages";
|
|
import { messagesStateReducer } from "@langchain/langgraph";
|
|
|
|
export const solanaAgentState = Annotation.Root({
|
|
messages: Annotation<BaseMessage[]>({
|
|
reducer: messagesStateReducer,
|
|
default: () => [],
|
|
}),
|
|
|
|
isSolanaReadQuery: Annotation<boolean>({
|
|
reducer: (x, y) => y ?? x ?? false,
|
|
default: () => false,
|
|
}),
|
|
|
|
isSolanaWriteQuery: Annotation<boolean>({
|
|
reducer: (x, y) => y ?? x ?? false,
|
|
default: () => false,
|
|
}),
|
|
|
|
isGeneralQuery: Annotation<boolean>({
|
|
reducer: (x, y) => y ?? x ?? false,
|
|
default: () => false,
|
|
}),
|
|
});
|