Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

843 B
Raw Blame
import { cli, Strategy } from '@jackwener/opencli/registry';
import { DOUBAO_DOMAIN, sendDoubaoMessage } from './utils.js';
export const sendCommand = cli({
    site: 'doubao',
    name: 'send',
    access: 'write',
    description: 'Send a message to Doubao web chat',
    domain: DOUBAO_DOMAIN,
    strategy: Strategy.COOKIE,
    browser: true,
    siteSession: 'persistent',
    navigateBefore: false,
    args: [{ name: 'text', required: true, positional: true, help: 'Message to send' }],
    columns: ['Status', 'SubmittedBy', 'InjectedText'],
    func: async (page, kwargs) => {
        const text = kwargs.text;
        const submittedBy = await sendDoubaoMessage(page, text);
        return [{
                Status: 'Success',
                SubmittedBy: submittedBy,
                InjectedText: text,
            }];
    },
});