mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
improvement(hitl): show resume url in tag dropdown within hitl block (#2464)
* fixed the human in the loop url resolution: * greptilecomments * greptilecomments --------- Co-authored-by: Pbonmars-20031006@users.noreply.github.com
This commit is contained in:
committed by
GitHub
parent
0005c3e465
commit
474762d6fb
@@ -844,8 +844,13 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
|
||||
if (!accessibleBlock) continue
|
||||
|
||||
// Skip the current block - blocks cannot reference their own outputs
|
||||
// Exception: approval blocks can reference their own outputs
|
||||
if (accessibleBlockId === blockId && accessibleBlock.type !== 'approval') continue
|
||||
// Exception: approval and human_in_the_loop blocks can reference their own outputs
|
||||
if (
|
||||
accessibleBlockId === blockId &&
|
||||
accessibleBlock.type !== 'approval' &&
|
||||
accessibleBlock.type !== 'human_in_the_loop'
|
||||
)
|
||||
continue
|
||||
|
||||
const blockConfig = getBlock(accessibleBlock.type)
|
||||
|
||||
@@ -972,6 +977,8 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
|
||||
const allTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`)
|
||||
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.url')) : allTags
|
||||
}
|
||||
} else if (accessibleBlock.type === 'human_in_the_loop') {
|
||||
blockTags = [`${normalizedBlockName}.url`]
|
||||
} else {
|
||||
const operationValue =
|
||||
mergedSubBlocks?.operation?.value ?? getSubBlockValue(accessibleBlockId, 'operation')
|
||||
|
||||
@@ -225,6 +225,13 @@ export function getBlockOutputs(
|
||||
return getUnifiedStartOutputs(subBlocks)
|
||||
}
|
||||
|
||||
if (blockType === 'human_in_the_loop') {
|
||||
// For human_in_the_loop, only expose url (inputFormat fields are only available after resume)
|
||||
return {
|
||||
url: { type: 'string', description: 'Resume UI URL' },
|
||||
}
|
||||
}
|
||||
|
||||
if (blockType === 'approval') {
|
||||
// Start with only url (apiUrl commented out - not accessible as output)
|
||||
const pauseResumeOutputs: Record<string, any> = {
|
||||
|
||||
Reference in New Issue
Block a user