fix(hitl): rename uiurl to url (#1855)

This commit is contained in:
Siddharth Ganesan
2025-11-07 19:51:27 -08:00
committed by GitHub
parent 7a8d47a72e
commit 3f435ce55e
6 changed files with 22 additions and 22 deletions

View File

@@ -163,7 +163,7 @@ export const PauseResumeBlock: BlockConfig<ResponseBlockOutput> = {
},
},
outputs: {
uiUrl: { type: 'string', description: 'Resume UI URL' },
url: { type: 'string', description: 'Resume UI URL' },
// apiUrl: { type: 'string', description: 'Resume API URL' }, // Commented out - not accessible as output
},
}

View File

@@ -529,16 +529,16 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
// For approval block, use dynamic outputs based on inputFormat
const dynamicOutputs = getBlockOutputPaths(sourceBlock.type, mergedSubBlocks)
// If it's a self-reference, only show uiUrl (available immediately)
// If it's a self-reference, only show url (available immediately)
const isSelfReference = activeSourceBlockId === blockId
if (dynamicOutputs.length > 0) {
const allTags = dynamicOutputs.map((path) => `${normalizedBlockName}.${path}`)
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.uiUrl')) : allTags
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.url')) : allTags
} else {
const outputPaths = generateOutputPaths(blockConfig.outputs || {})
const allTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`)
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.uiUrl')) : allTags
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.url')) : allTags
}
} else {
// Check for tool-specific outputs first
@@ -857,16 +857,16 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
// For approval block, use dynamic outputs based on inputFormat
const dynamicOutputs = getBlockOutputPaths(accessibleBlock.type, mergedSubBlocks)
// If it's a self-reference, only show uiUrl (available immediately)
// If it's a self-reference, only show url (available immediately)
const isSelfReference = accessibleBlockId === blockId
if (dynamicOutputs.length > 0) {
const allTags = dynamicOutputs.map((path) => `${normalizedBlockName}.${path}`)
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.uiUrl')) : allTags
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.url')) : allTags
} else {
const outputPaths = generateOutputPaths(blockConfig.outputs || {})
const allTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`)
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.uiUrl')) : allTags
blockTags = isSelfReference ? allTags.filter((tag) => tag.endsWith('.url')) : allTags
}
} else {
// Check for tool-specific outputs first

View File

@@ -429,8 +429,8 @@ export class BlockExecutor {
const placeholderState: BlockState = {
output: {
uiUrl: resumeLinks.uiUrl,
apiUrl: resumeLinks.apiUrl,
url: resumeLinks.uiUrl,
// apiUrl: resumeLinks.apiUrl, // Hidden from output
},
executed: false,
executionTime: existingState?.executionTime ?? 0,

View File

@@ -225,8 +225,8 @@ export class PauseResumeBlockHandler implements BlockHandler {
}
if (resumeLinks) {
output.uiUrl = resumeLinks.uiUrl
output.apiUrl = resumeLinks.apiUrl
output.url = resumeLinks.uiUrl
// output.apiUrl = resumeLinks.apiUrl // Hidden from output
}
return output
@@ -569,11 +569,11 @@ export class PauseResumeBlockHandler implements BlockHandler {
if (context.resumeLinks) {
if (context.resumeLinks.uiUrl) {
pauseOutput.uiUrl = context.resumeLinks.uiUrl
}
if (context.resumeLinks.apiUrl) {
pauseOutput.apiUrl = context.resumeLinks.apiUrl
pauseOutput.url = context.resumeLinks.uiUrl
}
// if (context.resumeLinks.apiUrl) {
// pauseOutput.apiUrl = context.resumeLinks.apiUrl
// } // Hidden from output
}
if (Array.isArray(context.inputFormat)) {

View File

@@ -168,9 +168,9 @@ export function getBlockOutputs(
}
if (blockType === 'approval') {
// Start with only uiUrl (apiUrl commented out - not accessible as output)
// Start with only url (apiUrl commented out - not accessible as output)
const pauseResumeOutputs: Record<string, any> = {
uiUrl: { type: 'string', description: 'Resume UI URL' },
url: { type: 'string', description: 'Resume UI URL' },
// apiUrl: { type: 'string', description: 'Resume API URL' }, // Commented out - not accessible as output
}

View File

@@ -520,15 +520,15 @@ export class PauseResumeManager {
mergedOutput.resume = mergedOutput.resume ?? mergedResponse.resume
// Preserve uiUrl and apiUrl from resume links
// Preserve url from resume links (apiUrl hidden from output)
const resumeLinks = mergedOutput.resume ?? mergedResponse.resume
if (resumeLinks && typeof resumeLinks === 'object') {
if (resumeLinks.uiUrl) {
mergedOutput.uiUrl = resumeLinks.uiUrl
}
if (resumeLinks.apiUrl) {
mergedOutput.apiUrl = resumeLinks.apiUrl
mergedOutput.url = resumeLinks.uiUrl
}
// if (resumeLinks.apiUrl) {
// mergedOutput.apiUrl = resumeLinks.apiUrl
// } // Hidden from output
}
for (const [key, value] of Object.entries(submissionPayload)) {