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.',
],
],
));