- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation
🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
45 lines
969 B
TypeScript
45 lines
969 B
TypeScript
/**
|
|
* The type of error that occurred.
|
|
* @public
|
|
*/
|
|
export type ErrorType = 'invalid-retry' | 'unknown-field'
|
|
|
|
/**
|
|
* Error thrown when encountering an issue during parsing.
|
|
*
|
|
* @public
|
|
*/
|
|
export class ParseError extends Error {
|
|
/**
|
|
* The type of error that occurred.
|
|
*/
|
|
type: ErrorType
|
|
|
|
/**
|
|
* In the case of an unknown field encountered in the stream, this will be the field name.
|
|
*/
|
|
field?: string | undefined
|
|
|
|
/**
|
|
* In the case of an unknown field encountered in the stream, this will be the value of the field.
|
|
*/
|
|
value?: string | undefined
|
|
|
|
/**
|
|
* The line that caused the error, if available.
|
|
*/
|
|
line?: string | undefined
|
|
|
|
constructor(
|
|
message: string,
|
|
options: {type: ErrorType; field?: string; value?: string; line?: string},
|
|
) {
|
|
super(message)
|
|
this.name = 'ParseError'
|
|
this.type = options.type
|
|
this.field = options.field
|
|
this.value = options.value
|
|
this.line = options.line
|
|
}
|
|
}
|