Skip to main content

get

codebolt.fileUpdateIntent.get(id: undefined): Promise<FileUpdateIntent>

Gets details of a specific file update intent.

Parameters

  • id (unknown): The unique identifier of the file update intent.

Returns

  • Promise<[FileUpdateIntent](/docs/reference/type-reference/codeboltjs/interfaces/FileUpdateIntent)>: A promise that resolves with the intent details.

Examples

Example 1: Get Intent Details

const intent = await codebolt.fileUpdateIntent.get('intent-id-123');

console.log('Intent:', intent.description);
console.log('Status:', intent.status);
console.log('Files:', intent.files);
console.log('Claimed by:', intent.claimedByName || intent.claimedBy);

Example 2: Check Intent Status

async function checkIntentStatus(intentId) {
const intent = await codebolt.fileUpdateIntent.get(intentId);

if (intent.status === 'active') {
console.log('Work is in progress');
} else if (intent.status === 'completed') {
console.log('Work has been completed');
} else if (intent.status === 'cancelled') {
console.log('Work was cancelled');
} else if (intent.status === 'expired') {
console.log('Intent expired');
}

return intent.status;
}

Notes

  • Returns complete intent details including all files
  • Use to check status before operations