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。

701 B
Raw Blame
import { cli, Strategy } from '@jackwener/opencli/registry';
import { DOUBAO_DOMAIN, getDoubaoVisibleTurns } from './utils.js';
export const readCommand = cli({
    site: 'doubao',
    name: 'read',
    access: 'read',
    description: 'Read the current Doubao conversation history',
    domain: DOUBAO_DOMAIN,
    strategy: Strategy.COOKIE,
    browser: true,
    siteSession: 'persistent',
    navigateBefore: false,
    args: [],
    columns: ['Role', 'Text'],
    func: async (page) => {
        const turns = await getDoubaoVisibleTurns(page);
        if (turns.length > 0)
            return turns;
        return [{ Role: 'System', Text: 'No visible Doubao messages were found.' }];
    },
});