Skip to content

Commit

Permalink
V9.3.8 - with Anthropic Computer Use
Browse files Browse the repository at this point in the history
  • Loading branch information
A9T9 committed Dec 3, 2024
1 parent 0459abe commit 5557d7b
Show file tree
Hide file tree
Showing 16 changed files with 1,206 additions and 190 deletions.
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "__MSG_description__",
"short_name": "__MSG_short_name__",
"default_locale": "en",
"version": "9.3.7",
"version": "9.3.8",

"icons": {
"128": "logo128.png"
Expand Down
3 changes: 3 additions & 0 deletions src/common/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const commandScopes = {

'aiPrompt': CommandScope.All,
'aiScreenXY': CommandScope.All,
'aiComputerUse': CommandScope.All,

'setProxy': CommandScope.All,
'run': CommandScope.All,
Expand Down Expand Up @@ -294,6 +295,7 @@ export function doesCommandSupportTargetOptions (str: string) {
case 'verifyNotChecked':
case 'aiPrompt':
case 'aiScreenXY':
case 'aiComputerUse':
return true

default:
Expand Down Expand Up @@ -360,6 +362,7 @@ export function canCommandFind (str: string): boolean {
case 'forEach':
case 'OCRExtractScreenshot':
case 'aiPrompt':
case 'aiComputerUse':
return false

default:
Expand Down
4 changes: 4 additions & 0 deletions src/common/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ export const SCREENSHOT_DELAY = /Linux/i.test(self.navigator.userAgent) ? 200 :
export const CS_IPC_TIMEOUT = 4000

export const STATE_STORAGE_KEY = 'background_state'

export const ANTHROPIC = {
COMPUTER_USE_MODEL: 'claude-3-5-sonnet-20241022'
}
5 changes: 5 additions & 0 deletions src/common/ts_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,11 @@ export function isMac (): boolean {
return !!/macintosh/i.test(userAgent) || (/mac os x/i.test(userAgent) && !/like mac os x/i.test(userAgent))
}

export function isWindows (): boolean {
const userAgent = window.navigator.userAgent
return !!/windows/i.test(userAgent)
}

export function resolvePath (path: any, basePath: string, relativePath: string): string {
const dirPath = path.dirname(basePath)

Expand Down
2 changes: 1 addition & 1 deletion src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ class Header extends React.Component {

// preset #210
// uncomment the following line to activate it
// applyPresetLicense('ENTERPRISE LICENSE HERE')
// applyPresetLicense('LICENSE KEY HERE')

window.addEventListener("beforeunload", this.beforeUnloadHandler);
}
Expand Down
11 changes: 11 additions & 0 deletions src/components/settings_modal/tabs/ai.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ class AITab extends React.Component<AiTabProps, AiTabAppState> {
<div className="ai-response">
<pre>{this.state.promptResponse}</pre>
</div>
<div className="ai-settings-item">
<span className="label-text"><strong>aiComputerUse:</strong> Max loops before stopping: </span>
<Input
type="number"
min="0"
style={{ marginLeft: '10px', width: '70px' }}
value={this.props.config.aiComputerUseMaxLoops}
onChange={(e) => onConfigChange('aiComputerUseMaxLoops', e.target.value)}
placeholder="20"
/>
</div>
<div className="row" style={{ marginBottom: '10px', color: 'red' }}>
{this.state.error}
</div>
Expand Down
Loading

0 comments on commit 5557d7b

Please sign in to comment.