- 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
20 lines
1.0 KiB
JavaScript
20 lines
1.0 KiB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
import { AnthropicError } from "../../core/error.mjs";
|
|
/**
|
|
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
*/
|
|
export function stringifyQuery(query) {
|
|
return Object.entries(query)
|
|
.filter(([_, value]) => typeof value !== 'undefined')
|
|
.map(([key, value]) => {
|
|
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
}
|
|
if (value === null) {
|
|
return `${encodeURIComponent(key)}=`;
|
|
}
|
|
throw new AnthropicError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
|
|
})
|
|
.join('&');
|
|
}
|
|
//# sourceMappingURL=query.mjs.map
|