use Revolution\Copilot\Contracts\CopilotSession;
use Revolution\Copilot\Facades\Copilot;
use Revolution\Copilot\Types\SessionConfig;
Copilot::start(function (CopilotSession $session) {
$response = $session->sendAndWait(prompt: '调查认证相关的设计并提出改进建议');
dump($response->content());
}, config: new SessionConfig(
customAgents: [
[
'name' => 'researcher',
'displayName' => 'Research Agent',
'description' => '调查代码并整理要点',
'tools' => ['grep', 'glob', 'view'],
'prompt' => 'You are a research assistant. Analyze code and summarize findings.',
],
[
'name' => 'editor',
'displayName' => 'Editor Agent',
'description' => '进行必要最小限度的代码变更',
'tools' => ['view', 'edit', 'bash'],
'prompt' => 'You are a code editor. Make minimal, surgical changes only.',
],
],
));