This commit is contained in:
Vendored
+26
@@ -0,0 +1,26 @@
|
|||||||
|
import { AgentConfig } from '@page-agent/core';
|
||||||
|
import { PageAgentCore } from '@page-agent/core';
|
||||||
|
import { PageControllerConfig } from '@page-agent/page-controller';
|
||||||
|
import { Panel } from '@page-agent/ui';
|
||||||
|
import { PanelConfig } from '@page-agent/ui';
|
||||||
|
|
||||||
|
export declare class PageAgent extends PageAgentCore {
|
||||||
|
panel: Panel;
|
||||||
|
constructor(config: PageAgentConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare type PageAgentConfig = AgentConfig & PageControllerConfig & Omit<PanelConfig, 'language'>;
|
||||||
|
|
||||||
|
|
||||||
|
export * from "@page-agent/core";
|
||||||
|
|
||||||
|
export { }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
pageAgent?: PageAgent
|
||||||
|
PageAgent: typeof PageAgent
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+6
-6
@@ -2,14 +2,14 @@
|
|||||||
"name": "page-agent",
|
"name": "page-agent",
|
||||||
"version": "1.11.0",
|
"version": "1.11.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/esm/page-agent.js",
|
"main": "./page-agent.js",
|
||||||
"module": "./dist/esm/page-agent.js",
|
"module": "./page-agent.js",
|
||||||
"types": "./dist/esm/PageAgent.d.ts",
|
"types": "./PageAgent.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/esm/PageAgent.d.ts",
|
"types": "./PageAgent.d.ts",
|
||||||
"import": "./dist/esm/page-agent.js",
|
"import": "./page-agent.js",
|
||||||
"default": "./dist/esm/page-agent.js"
|
"default": "./page-agent.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Vendored
+30
@@ -0,0 +1,30 @@
|
|||||||
|
import { PageAgentCore } from "@page-agent/core";
|
||||||
|
import { PageController } from "@page-agent/page-controller";
|
||||||
|
import { Panel } from "@page-agent/ui";
|
||||||
|
export * from "@page-agent/core";
|
||||||
|
//#region src/PageAgent.ts
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2025 Alibaba Group Holding Limited
|
||||||
|
* All rights reserved.
|
||||||
|
*/
|
||||||
|
var PageAgent = class extends PageAgentCore {
|
||||||
|
panel;
|
||||||
|
constructor(config) {
|
||||||
|
const pageController = new PageController({
|
||||||
|
...config,
|
||||||
|
enableMask: config.enableMask ?? true
|
||||||
|
});
|
||||||
|
super({
|
||||||
|
...config,
|
||||||
|
pageController
|
||||||
|
});
|
||||||
|
this.panel = new Panel(this, {
|
||||||
|
language: config.language,
|
||||||
|
promptForNextTask: config.promptForNextTask
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//#endregion
|
||||||
|
export { PageAgent };
|
||||||
|
|
||||||
|
//# sourceMappingURL=page-agent.js.map
|
||||||
Reference in New Issue
Block a user