@@ -5,13 +5,17 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
55 if ( message . action === "processFiles" ) {
66 const files = JSON . parse ( message . files ) as FileDetails [ ] ;
77 // Set initial processing state
8- chrome . storage . local . set ( { processingState : { status : "Processing..." , type : "processing" } } ) ;
8+ chrome . storage . local . set ( {
9+ processingState : { status : "Processing..." , type : "processing" } ,
10+ } ) ;
911 handleFileProcessing ( files , message . tokens )
1012 . then ( sendResponse )
1113 . catch ( ( error ) => {
1214 const errorMessage = formatErrorMessage ( error ) ;
1315 // Store error state
14- chrome . storage . local . set ( { processingState : { status : errorMessage , type : "error" } } ) ;
16+ chrome . storage . local . set ( {
17+ processingState : { status : errorMessage , type : "error" } ,
18+ } ) ;
1519 sendResponse ( { success : false , error : errorMessage } ) ;
1620 } ) ;
1721 return true ;
@@ -59,7 +63,9 @@ export async function handleFileProcessing(
5963 try {
6064 if ( ! tokens . chatsvcagg || ! tokens . ic3 || ! tokens . permissionsId ) {
6165 const errorMsg = "Could not find required tokens" ;
62- chrome . storage . local . set ( { processingState : { status : errorMsg , type : "error" } } ) ;
66+ chrome . storage . local . set ( {
67+ processingState : { status : errorMsg , type : "error" } ,
68+ } ) ;
6369 throw new Error ( errorMsg ) ;
6470 }
6571 const teams = new MsTeamsClient (
@@ -70,11 +76,11 @@ export async function handleFileProcessing(
7076 const result = await teams . uploadFiles ( files ) ;
7177
7278 // Store processing result state
73- chrome . storage . local . set ( {
74- processingState : {
75- status : result . status || "" ,
76- type : result . success ? "success" : "error"
77- }
79+ chrome . storage . local . set ( {
80+ processingState : {
81+ status : result . status || "" ,
82+ type : result . success ? "success" : "error" ,
83+ } ,
7884 } ) ;
7985
8086 chrome . runtime . sendMessage ( {
@@ -90,7 +96,9 @@ export async function handleFileProcessing(
9096 const errorResult = { success : false , error : errorMessage } ;
9197
9298 // Store error state
93- chrome . storage . local . set ( { processingState : { status : errorMessage , type : "error" } } ) ;
99+ chrome . storage . local . set ( {
100+ processingState : { status : errorMessage , type : "error" } ,
101+ } ) ;
94102
95103 chrome . runtime . sendMessage ( {
96104 type : "processUpdate" ,
0 commit comments