File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -83,25 +83,20 @@ export class DoitMCPAgent extends McpAgent {
8383 // Persist props to Durable Object storage
8484 private async saveProps ( ) : Promise < void > {
8585 if ( this . ctx ?. storage ) {
86- await this . ctx . storage . put ( "persistedProps" , {
87- customerContext : this . props . customerContext ,
88- lastUpdated : Date . now ( ) ,
89- } ) ;
86+ await this . ctx . storage . put ( "persistedProps" , this . props . customerContext ) ;
9087 }
9188 }
9289
9390 // Load props from Durable Object storage
9491 private async loadPersistedProps ( ) : Promise < void > {
9592 if ( this . ctx ?. storage ) {
96- const persistedProps = await this . ctx . storage . get < {
97- apiKey : string ;
98- customerContext : string ;
99- lastUpdated : number ;
100- } > ( "persistedProps" ) ;
93+ const persistedProps = await this . ctx . storage . get < string > (
94+ "persistedProps"
95+ ) ;
10196 if ( persistedProps ) {
10297 console . log ( "Loading persisted props:" , persistedProps ) ;
10398 // Update props with persisted values
104- this . props . customerContext = persistedProps . customerContext ;
99+ this . props . customerContext = persistedProps ;
105100 }
106101 }
107102 }
You can’t perform that action at this time.
0 commit comments