mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-17 01:42:43 -05:00
feat(notes): add notes (#1898)
* Notes v1 * v2 * Lint * Consolidate into hook * Simplify workflow code * Fix hitl casing * Don't allow edges in note block and explicitly exclude from executor * Add hooks * Consolidate hook * Consolidate utils checks * Consolidate dimensions
This commit is contained in:
committed by
GitHub
parent
7c398e64dc
commit
1cce486442
@@ -21,6 +21,8 @@ export enum BlockType {
|
||||
|
||||
WAIT = 'wait',
|
||||
|
||||
NOTE = 'note',
|
||||
|
||||
SENTINEL_START = 'sentinel_start',
|
||||
SENTINEL_END = 'sentinel_end',
|
||||
}
|
||||
@@ -31,7 +33,11 @@ export const TRIGGER_BLOCK_TYPES = [
|
||||
BlockType.TRIGGER,
|
||||
] as const
|
||||
|
||||
export const METADATA_ONLY_BLOCK_TYPES = [BlockType.LOOP, BlockType.PARALLEL] as const
|
||||
export const METADATA_ONLY_BLOCK_TYPES = [
|
||||
BlockType.LOOP,
|
||||
BlockType.PARALLEL,
|
||||
BlockType.NOTE,
|
||||
] as const
|
||||
|
||||
export type LoopType = 'for' | 'forEach' | 'while' | 'doWhile'
|
||||
|
||||
@@ -247,6 +253,14 @@ export function isAgentBlockType(blockType: string | undefined): boolean {
|
||||
return blockType === BlockType.AGENT
|
||||
}
|
||||
|
||||
export function isAnnotationOnlyBlock(blockType: string | undefined): boolean {
|
||||
return blockType === BlockType.NOTE
|
||||
}
|
||||
|
||||
export function supportsHandles(blockType: string | undefined): boolean {
|
||||
return !isAnnotationOnlyBlock(blockType)
|
||||
}
|
||||
|
||||
export function getDefaultTokens() {
|
||||
return {
|
||||
prompt: DEFAULTS.TOKENS.PROMPT,
|
||||
|
||||
Reference in New Issue
Block a user