Skip to content

Commit 3730cf6

Browse files
authored
feat(tarko): add gui agent screenshot render strategy config (#1296)
1 parent 4aa9d78 commit 3730cf6

14 files changed

Lines changed: 881 additions & 410 deletions

File tree

multimodal/agent-tars/core/src/agent-tars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ export class AgentTARS<T extends AgentTARSOptions = AgentTARSOptions> extends MC
6363
'Please book me the earliest flight from Hangzhou to Shenzhen on 10.1',
6464
],
6565
enableContextualSelector: true,
66+
guiAgent: {
67+
defaultScreenshotRenderStrategy: 'beforeAction',
68+
enableScreenshotRenderStrategySwitch: true,
69+
renderGUIAction: true,
70+
},
6671
};
6772
private workspace: string;
6873
// FIXME: remove it since options is strict type already

multimodal/omni-tars/omni-agent/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ export default class OmniTARSAgent extends ComposableAgent {
5656
},
5757
],
5858
},
59+
guiAgent: {
60+
defaultScreenshotRenderStrategy: 'afterAction',
61+
enableScreenshotRenderStrategySwitch: true,
62+
renderGUIAction: true,
63+
},
5964
};
6065

6166
constructor(options: OmniTarsOption) {

multimodal/tarko/agent-web-ui/src/common/constants/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ export {
9090
isContextualSelectorEnabled,
9191
getLogoUrl,
9292
getWorkspaceNavItems,
93+
getGUIAgentConfig,
9394
} from './shared';

multimodal/tarko/agent-web-ui/src/common/constants/shared.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,14 @@ export function getLogoUrl(): string {
4040
export function getWorkspaceNavItems() {
4141
return getWebUIConfig().workspace?.navItems || [];
4242
}
43+
44+
/**
45+
* Get GUI Agent configuration from web UI config
46+
*/
47+
export function getGUIAgentConfig() {
48+
return getWebUIConfig().guiAgent || {
49+
defaultScreenshotRenderStrategy: 'afterAction',
50+
enableScreenshotRenderStrategySwitch: false,
51+
renderGUIAction: true,
52+
};
53+
}

0 commit comments

Comments
 (0)