File tree Expand file tree Collapse file tree
packages/atxp/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ export async function imageCommand(prompt: string): Promise<void> {
4848 } ) ) as ToolResult ;
4949
5050 const pollText = extractResult ( pollResult ) ;
51- let parsed : any ;
51+ let parsed : Record < string , unknown > ;
5252 try {
53- parsed = JSON . parse ( pollText ) ;
53+ parsed = JSON . parse ( pollText ) as Record < string , unknown > ;
5454 } catch {
5555 // Non-JSON response — treat as final
5656 spinner . stop ( ) ;
@@ -66,7 +66,7 @@ export async function imageCommand(prompt: string): Promise<void> {
6666 return ;
6767 } else if ( parsed . status === 'failed' || parsed . error ) {
6868 spinner . fail ( 'Image generation failed' ) ;
69- console . error ( chalk . red ( parsed . error || JSON . stringify ( parsed ) ) ) ;
69+ console . error ( chalk . red ( ( parsed . error as string ) || JSON . stringify ( parsed ) ) ) ;
7070 process . exit ( 1 ) ;
7171 }
7272
Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ export async function musicCommand(prompt: string): Promise<void> {
4747 } ) ) as ToolResult ;
4848
4949 const pollText = extractResult ( pollResult ) ;
50- let parsed : any ;
50+ let parsed : Record < string , unknown > ;
5151 try {
52- parsed = JSON . parse ( pollText ) ;
52+ parsed = JSON . parse ( pollText ) as Record < string , unknown > ;
5353 } catch {
5454 spinner . stop ( ) ;
5555 console . log ( pollText ) ;
@@ -63,7 +63,7 @@ export async function musicCommand(prompt: string): Promise<void> {
6363 return ;
6464 } else if ( parsed . status === 'failed' || parsed . error ) {
6565 spinner . fail ( 'Music generation failed' ) ;
66- console . error ( chalk . red ( parsed . error || JSON . stringify ( parsed ) ) ) ;
66+ console . error ( chalk . red ( ( parsed . error as string ) || JSON . stringify ( parsed ) ) ) ;
6767 process . exit ( 1 ) ;
6868 }
6969
Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ export async function videoCommand(prompt: string): Promise<void> {
4747 } ) ) as ToolResult ;
4848
4949 const pollText = extractResult ( pollResult ) ;
50- let parsed : any ;
50+ let parsed : Record < string , unknown > ;
5151 try {
52- parsed = JSON . parse ( pollText ) ;
52+ parsed = JSON . parse ( pollText ) as Record < string , unknown > ;
5353 } catch {
5454 spinner . stop ( ) ;
5555 console . log ( pollText ) ;
@@ -63,7 +63,7 @@ export async function videoCommand(prompt: string): Promise<void> {
6363 return ;
6464 } else if ( parsed . status === 'failed' || parsed . error ) {
6565 spinner . fail ( 'Video generation failed' ) ;
66- console . error ( chalk . red ( parsed . error || JSON . stringify ( parsed ) ) ) ;
66+ console . error ( chalk . red ( ( parsed . error as string ) || JSON . stringify ( parsed ) ) ) ;
6767 process . exit ( 1 ) ;
6868 }
6969
You can’t perform that action at this time.
0 commit comments