支援AI 代理工作的介面
執行、工具、核准。控制權始終在應用程式。
AI 代理元件呈現由宿主應用提供的記錄,併發出操作請求。工具執行、許可權、傳輸、持久化以及受控資料更新仍由你的應用負責。
範例
顯示由宿主應用程式管理的執行,並處理取消請求。
import '@aceshooting/lyra-ui/components/lr-background-runs.js';
const board = document.createElement('lr-background-runs');
board.runs = [{ id: 'index', label: 'Index the project', status: 'running' }];
board.addEventListener('lr-run-cancel', event => {
// Demo only: your app cancels the job and supplies updated records.
console.info('Cancellation requested for', event.detail.runId);
});
document.body.append(board);