@@ -16,7 +16,6 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
1616 bgColor : '#E0E0E0' ,
1717 icon : MicrosoftSharepointIcon ,
1818 subBlocks : [
19- // Operation selector
2019 {
2120 id : 'operation' ,
2221 title : 'Operation' ,
@@ -32,7 +31,6 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
3231 { label : 'Add List Items' , id : 'add_list_items' } ,
3332 ] ,
3433 } ,
35- // Sharepoint Credentials
3634 {
3735 id : 'credential' ,
3836 title : 'Microsoft Account' ,
@@ -217,7 +215,6 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
217215 params : ( params ) => {
218216 const { credential, siteSelector, manualSiteId, mimeType, ...rest } = params
219217
220- // Use siteSelector if provided, otherwise use manualSiteId
221218 const effectiveSiteId = ( siteSelector || manualSiteId || '' ) . trim ( )
222219
223220 const {
@@ -239,12 +236,10 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
239236 } )
240237 }
241238 }
242- // Ensure listItemFields is an object for the tool schema
243239 if ( typeof parsedItemFields !== 'object' || parsedItemFields === null ) {
244240 parsedItemFields = undefined
245241 }
246242
247- // Sanitize item ID (required by tool)
248243 const rawItemId = providedItemId ?? listItemId
249244 const sanitizedItemId =
250245 rawItemId === undefined || rawItemId === null
@@ -257,7 +252,6 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
257252 return undefined
258253 }
259254
260- // Debug logging for update_list/add_list_items param mapping
261255 if ( others . operation === 'update_list' || others . operation === 'add_list_items' ) {
262256 try {
263257 logger . info ( 'SharepointBlock list item param check' , {
@@ -280,7 +274,6 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
280274 pageSize : others . pageSize ? Number . parseInt ( others . pageSize as string , 10 ) : undefined ,
281275 mimeType : mimeType ,
282276 ...others ,
283- // Map to tool param names
284277 itemId : sanitizedItemId ,
285278 listItemFields : parsedItemFields ,
286279 includeColumns : coerceBoolean ( includeColumns ) ,
@@ -292,26 +285,20 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
292285 inputs : {
293286 operation : { type : 'string' , description : 'Operation to perform' } ,
294287 credential : { type : 'string' , description : 'Microsoft account credential' } ,
295- // Create Page operation inputs
296288 pageName : { type : 'string' , description : 'Page name' } ,
297289 pageContent : { type : 'string' , description : 'Page content' } ,
298290 pageTitle : { type : 'string' , description : 'Page title' } ,
299- // Read Page operation inputs
300291 pageId : { type : 'string' , description : 'Page ID' } ,
301- // List operation inputs
302292 siteSelector : { type : 'string' , description : 'Site selector' } ,
303293 manualSiteId : { type : 'string' , description : 'Manual site ID' } ,
304294 pageSize : { type : 'number' , description : 'Results per page' } ,
305- // Create List operation inputs
306295 listDisplayName : { type : 'string' , description : 'List display name' } ,
307296 listDescription : { type : 'string' , description : 'List description' } ,
308297 listTemplate : { type : 'string' , description : 'List template' } ,
309- // Read List operation inputs
310298 listId : { type : 'string' , description : 'List ID' } ,
311299 listTitle : { type : 'string' , description : 'List title' } ,
312300 includeColumns : { type : 'boolean' , description : 'Include columns in response' } ,
313301 includeItems : { type : 'boolean' , description : 'Include items in response' } ,
314- // Update List Item operation inputs
315302 listItemId : { type : 'string' , description : 'List item ID' } ,
316303 listItemFields : { type : 'string' , description : 'List item fields' } ,
317304 } ,
0 commit comments