- 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
25 lines
700 B
JavaScript
25 lines
700 B
JavaScript
import { SCALAR } from './identity.js';
|
|
import { NodeBase } from './Node.js';
|
|
import { toJS } from './toJS.js';
|
|
|
|
const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
|
|
class Scalar extends NodeBase {
|
|
constructor(value) {
|
|
super(SCALAR);
|
|
this.value = value;
|
|
}
|
|
toJSON(arg, ctx) {
|
|
return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
|
|
}
|
|
toString() {
|
|
return String(this.value);
|
|
}
|
|
}
|
|
Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED';
|
|
Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL';
|
|
Scalar.PLAIN = 'PLAIN';
|
|
Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';
|
|
Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';
|
|
|
|
export { Scalar, isScalarValue };
|