| export function parseExecShellCommandError( | |
| toolResultString: string | undefined | |
| ): string | undefined { | |
| if (!toolResultString) return undefined; | |
| try { | |
| const parsed: unknown = JSON.parse(toolResultString); | |
| if ( | |
| parsed && | |
| typeof parsed === 'object' && | |
| !Array.isArray(parsed) && | |
| typeof (parsed as Record<string, unknown>).error === 'string' | |
| ) { | |
| return (parsed as { error: string }).error; | |
| } | |
| } catch { | |
| // Plain-text result = stdout/stderr, no structured error to surface. | |
| } | |
| return undefined; | |
| } | |
Xet Storage Details
- Size:
- 525 Bytes
- Xet hash:
- fd39217abded25d01e2fa1d788ae266e3ffbc856c4501a48d1fa0f7ae1b9a3da
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.