This pull request includes several changes to replace the ThunkAction type with CompositeAction across various files in the app/(playground)/p/[agentId]/beta-proto directory. Additionally, there are updates to the GraphProvider component to improve state management.
app/(playground)/p/[agentId]/beta-proto/graph/provider.tsx: Enhanced state management by using a useRef to keep track of the current state and updated the enhancedDispatch function to use this ref. (app/(playground)/p/[agentId]/beta-proto/graph/provider.tsxL34-R64)
This pull request includes several changes to replace the
ThunkAction
type withCompositeAction
across various files in theapp/(playground)/p/[agentId]/beta-proto
directory. Additionally, there are updates to theGraphProvider
component to improve state management.Type Replacement:
app/(playground)/p/[agentId]/beta-proto/flow/composite-actions.ts
: Changed the type ofrunFlow
function fromThunkAction
toCompositeAction
. (app/(playground)/p/[agentId]/beta-proto/flow/composite-actions.tsL2-R10)app/(playground)/p/[agentId]/beta-proto/giselle-node/components/panel/prompt.tsx
: Updated imports and function types fromThunkAction
toCompositeAction
. (app/(playground)/p/[agentId]/beta-proto/giselle-node/components/panel/prompt.tsxL26-R26, app/(playground)/p/[agentId]/beta-proto/giselle-node/components/panel/prompt.tsxL47-R47)app/(playground)/p/[agentId]/beta-proto/graph/actions.ts
: Replaced multipleThunkAction
types withCompositeAction
in various functions. (app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL54-R54, app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL174-R174, app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL271-R271, app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL472-R472, app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL818-R818, app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL1056-R1056, app/(playground)/p/[agentId]/beta-proto/graph/actions.tsL1236-R1236)app/(playground)/p/[agentId]/beta-proto/graph/context.ts
: ChangedThunkAction
type definition toCompositeAction
. (app/(playground)/p/[agentId]/beta-proto/graph/context.tsL5-R9)State Management Improvement:
app/(playground)/p/[agentId]/beta-proto/graph/provider.tsx
: Enhanced state management by using auseRef
to keep track of the current state and updated theenhancedDispatch
function to use this ref. (app/(playground)/p/[agentId]/beta-proto/graph/provider.tsxL34-R64)