diff --git a/package.json b/package.json
index a04ceaf..af62ca8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "fuji-web",
- "version": "2.1.3",
+ "version": "2.2.0",
"description": "A tool that redefines web interaction, making complex online tasks as simple as uttering a single command.",
"repository": {
"type": "git",
@@ -35,7 +35,7 @@
"formik": "^2.4.5",
"immer": "^10.0.3",
"lodash": "^4.17.21",
- "openai": "^4.47.1",
+ "openai": "^4.60.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^5.0.1",
@@ -44,7 +44,7 @@
"react-use": "^17.4.0",
"tailwindcss": "^3.4.4",
"webextension-polyfill": "0.10.0",
- "zod": "^3.22.4",
+ "zod": "^3.23.8",
"zod-validation-error": "^3.3.1",
"zustand": "^4.5.2"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8d7f6de..54c58e5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -36,8 +36,8 @@ dependencies:
specifier: ^4.17.21
version: 4.17.21
openai:
- specifier: ^4.47.1
- version: 4.47.1
+ specifier: ^4.60.0
+ version: 4.60.0(zod@3.23.8)
react:
specifier: 18.2.0
version: 18.2.0
@@ -63,11 +63,11 @@ dependencies:
specifier: 0.10.0
version: 0.10.0
zod:
- specifier: ^3.22.4
- version: 3.22.4
+ specifier: ^3.23.8
+ version: 3.23.8
zod-validation-error:
specifier: ^3.3.1
- version: 3.3.1(zod@3.22.4)
+ version: 3.3.1(zod@3.23.8)
zustand:
specifier: ^4.5.2
version: 4.5.2(@types/react@18.2.37)(immer@10.0.3)(react@18.2.0)
@@ -2976,6 +2976,10 @@ packages:
/@types/prop-types@15.7.11:
resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==}
+ /@types/qs@6.9.15:
+ resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==}
+ dev: false
+
/@types/react-dom@18.2.22:
resolution: {integrity: sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==}
dependencies:
@@ -3550,9 +3554,9 @@ packages:
resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==}
engines: {node: '>= 0.4'}
dependencies:
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
get-intrinsic: 1.2.4
is-string: 1.0.7
dev: true
@@ -3601,9 +3605,9 @@ packages:
resolution: {integrity: sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==}
engines: {node: '>= 0.4'}
dependencies:
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
es-errors: 1.3.0
es-shim-unscopables: 1.0.2
dev: true
@@ -3612,9 +3616,9 @@ packages:
resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==}
engines: {node: '>= 0.4'}
dependencies:
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
es-shim-unscopables: 1.0.2
dev: true
@@ -3686,6 +3690,11 @@ packages:
postcss-value-parser: 4.2.0
dev: true
+ /available-typed-arrays@1.0.6:
+ resolution: {integrity: sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==}
+ engines: {node: '>= 0.4'}
+ dev: true
+
/available-typed-arrays@1.0.7:
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
@@ -3808,11 +3817,18 @@ packages:
dependencies:
balanced-match: 1.0.2
+ /braces@3.0.2:
+ resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
+ engines: {node: '>=8'}
+ dependencies:
+ fill-range: 7.0.1
+
/braces@3.0.3:
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
engines: {node: '>=8'}
dependencies:
fill-range: 7.1.1
+ dev: true
/browserslist@4.22.3:
resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==}
@@ -3842,6 +3858,16 @@ packages:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
dev: true
+ /call-bind@1.0.6:
+ resolution: {integrity: sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ es-errors: 1.3.0
+ function-bind: 1.1.2
+ get-intrinsic: 1.2.4
+ set-function-length: 1.2.1
+ dev: true
+
/call-bind@1.0.7:
resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
engines: {node: '>= 0.4'}
@@ -3851,7 +3877,6 @@ packages:
function-bind: 1.1.2
get-intrinsic: 1.2.4
set-function-length: 1.2.1
- dev: true
/callsites@3.1.0:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
@@ -3923,7 +3948,7 @@ packages:
engines: {node: '>= 8.10.0'}
dependencies:
anymatch: 3.1.3
- braces: 3.0.3
+ braces: 3.0.2
glob-parent: 5.1.2
is-binary-path: 2.1.0
is-glob: 4.0.3
@@ -4353,7 +4378,6 @@ packages:
es-define-property: 1.0.0
es-errors: 1.3.0
gopd: 1.0.1
- dev: true
/define-properties@1.2.1:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
@@ -4502,6 +4526,51 @@ packages:
stackframe: 1.3.4
dev: false
+ /es-abstract@1.22.3:
+ resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ array-buffer-byte-length: 1.0.1
+ arraybuffer.prototype.slice: 1.0.3
+ available-typed-arrays: 1.0.6
+ call-bind: 1.0.7
+ es-set-tostringtag: 2.0.3
+ es-to-primitive: 1.2.1
+ function.prototype.name: 1.1.6
+ get-intrinsic: 1.2.4
+ get-symbol-description: 1.0.2
+ globalthis: 1.0.3
+ gopd: 1.0.1
+ has-property-descriptors: 1.0.2
+ has-proto: 1.0.3
+ has-symbols: 1.0.3
+ hasown: 2.0.2
+ internal-slot: 1.0.7
+ is-array-buffer: 3.0.4
+ is-callable: 1.2.7
+ is-negative-zero: 2.0.2
+ is-regex: 1.1.4
+ is-shared-array-buffer: 1.0.2
+ is-string: 1.0.7
+ is-typed-array: 1.1.13
+ is-weakref: 1.0.2
+ object-inspect: 1.13.1
+ object-keys: 1.1.1
+ object.assign: 4.1.5
+ regexp.prototype.flags: 1.5.2
+ safe-array-concat: 1.1.2
+ safe-regex-test: 1.0.3
+ string.prototype.trim: 1.2.8
+ string.prototype.trimend: 1.0.7
+ string.prototype.trimstart: 1.0.7
+ typed-array-buffer: 1.0.1
+ typed-array-byte-length: 1.0.0
+ typed-array-byte-offset: 1.0.0
+ typed-array-length: 1.0.4
+ unbox-primitive: 1.0.2
+ which-typed-array: 1.1.14
+ dev: true
+
/es-abstract@1.23.3:
resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==}
engines: {node: '>= 0.4'}
@@ -4563,12 +4632,10 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.2.4
- dev: true
/es-errors@1.3.0:
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
engines: {node: '>= 0.4'}
- dev: true
/es-get-iterator@1.1.3:
resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==}
@@ -4589,20 +4656,20 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
asynciterator.prototype: 1.0.0
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
es-errors: 1.3.0
- es-set-tostringtag: 2.0.3
+ es-set-tostringtag: 2.0.2
function-bind: 1.1.2
get-intrinsic: 1.2.4
globalthis: 1.0.3
- has-property-descriptors: 1.0.2
- has-proto: 1.0.3
+ has-property-descriptors: 1.0.1
+ has-proto: 1.0.1
has-symbols: 1.0.3
internal-slot: 1.0.7
iterator.prototype: 1.1.2
- safe-array-concat: 1.1.2
+ safe-array-concat: 1.1.0
dev: true
/es-iterator-helpers@1.0.19:
@@ -4636,6 +4703,15 @@ packages:
es-errors: 1.3.0
dev: true
+ /es-set-tostringtag@2.0.2:
+ resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ get-intrinsic: 1.2.4
+ has-tostringtag: 1.0.2
+ hasown: 2.0.2
+ dev: true
+
/es-set-tostringtag@2.0.3:
resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==}
engines: {node: '>= 0.4'}
@@ -4733,7 +4809,7 @@ packages:
eslint: 8.57.0
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.9.1)(eslint@8.57.0)
object.assign: 4.1.5
- object.entries: 1.1.8
+ object.entries: 1.1.7
semver: 6.3.1
dev: true
@@ -5118,8 +5194,8 @@ packages:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
dev: true
- /fast-loops@1.1.4:
- resolution: {integrity: sha512-8dbd3XWoKCTms18ize6JmQF1SFnnfj5s0B7rRry22EofgMu7B6LKHVh+XfFqFGsqnbH54xgeO83PzpKI+ODhlg==}
+ /fast-loops@1.1.3:
+ resolution: {integrity: sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g==}
dev: false
/fast-shallow-equal@1.0.0:
@@ -5160,11 +5236,18 @@ packages:
minimatch: 5.1.6
dev: true
+ /fill-range@7.0.1:
+ resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
+ engines: {node: '>=8'}
+ dependencies:
+ to-regex-range: 5.0.1
+
/fill-range@7.1.1:
resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
engines: {node: '>=8'}
dependencies:
to-regex-range: 5.0.1
+ dev: true
/find-root@1.1.0:
resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==}
@@ -5359,7 +5442,6 @@ packages:
has-proto: 1.0.3
has-symbols: 1.0.3
hasown: 2.0.2
- dev: true
/get-nonce@1.0.1:
resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==}
@@ -5488,7 +5570,6 @@ packages:
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
dependencies:
get-intrinsic: 1.2.4
- dev: true
/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
@@ -5512,21 +5593,29 @@ packages:
engines: {node: '>=8'}
dev: true
+ /has-property-descriptors@1.0.1:
+ resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==}
+ dependencies:
+ get-intrinsic: 1.2.4
+ dev: true
+
/has-property-descriptors@1.0.2:
resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
dependencies:
es-define-property: 1.0.0
+
+ /has-proto@1.0.1:
+ resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
+ engines: {node: '>= 0.4'}
dev: true
/has-proto@1.0.3:
resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==}
engines: {node: '>= 0.4'}
- dev: true
/has-symbols@1.0.3:
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
engines: {node: '>= 0.4'}
- dev: true
/has-tostringtag@1.0.2:
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
@@ -5699,7 +5788,7 @@ packages:
resolution: {integrity: sha512-I7GEdScunP1dQ6IM2mQWh6v0mOYdYmH3Bp31UecKdrcUgcURTcctSe1IECdUznSHKSmsHtjrT3CwCPI1pyxfUQ==}
dependencies:
css-in-js-utils: 3.1.0
- fast-loops: 1.1.4
+ fast-loops: 1.1.3
dev: false
/internal-slot@1.0.7:
@@ -5858,6 +5947,11 @@ packages:
resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==}
dev: true
+ /is-negative-zero@2.0.2:
+ resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
+ engines: {node: '>= 0.4'}
+ dev: true
+
/is-negative-zero@2.0.3:
resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==}
engines: {node: '>= 0.4'}
@@ -5900,6 +5994,12 @@ packages:
resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==}
dev: true
+ /is-shared-array-buffer@1.0.2:
+ resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==}
+ dependencies:
+ call-bind: 1.0.7
+ dev: true
+
/is-shared-array-buffer@1.0.3:
resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==}
engines: {node: '>= 0.4'}
@@ -6903,7 +7003,7 @@ packages:
resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
engines: {node: '>=8.6'}
dependencies:
- braces: 3.0.3
+ braces: 3.0.2
picomatch: 2.3.1
/micromatch@4.0.7:
@@ -7101,7 +7201,6 @@ packages:
/object-inspect@1.13.1:
resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==}
- dev: true
/object-is@1.1.5:
resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==}
@@ -7130,9 +7229,9 @@ packages:
resolution: {integrity: sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==}
engines: {node: '>= 0.4'}
dependencies:
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
dev: true
/object.entries@1.1.8:
@@ -7148,9 +7247,9 @@ packages:
resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==}
engines: {node: '>= 0.4'}
dependencies:
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
dev: true
/object.fromentries@2.0.8:
@@ -7167,9 +7266,9 @@ packages:
resolution: {integrity: sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==}
dependencies:
array.prototype.filter: 1.0.3
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
es-errors: 1.3.0
dev: true
@@ -7177,9 +7276,9 @@ packages:
resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==}
engines: {node: '>= 0.4'}
dependencies:
- call-bind: 1.0.7
+ call-bind: 1.0.6
define-properties: 1.2.1
- es-abstract: 1.23.3
+ es-abstract: 1.22.3
dev: true
/object.values@1.2.0:
@@ -7211,18 +7310,25 @@ packages:
mimic-fn: 4.0.0
dev: true
- /openai@4.47.1:
- resolution: {integrity: sha512-WWSxhC/69ZhYWxH/OBsLEirIjUcfpQ5+ihkXKp06hmeYXgBBIUCa9IptMzYx6NdkiOCsSGYCnTIsxaic3AjRCQ==}
+ /openai@4.60.0(zod@3.23.8):
+ resolution: {integrity: sha512-U/wNmrUPdfsvU1GrKRP5mY5YHR3ev6vtdfNID6Sauz+oquWD8r+cXPL1xiUlYniosPKajy33muVHhGS/9/t6KA==}
hasBin: true
+ peerDependencies:
+ zod: ^3.23.8
+ peerDependenciesMeta:
+ zod:
+ optional: true
dependencies:
'@types/node': 18.19.15
'@types/node-fetch': 2.6.11
+ '@types/qs': 6.9.15
abort-controller: 3.0.0
agentkeepalive: 4.5.0
form-data-encoder: 1.7.2
formdata-node: 4.4.1
node-fetch: 2.7.0
- web-streams-polyfill: 3.3.2
+ qs: 6.13.0
+ zod: 3.23.8
transitivePeerDependencies:
- encoding
dev: false
@@ -7570,6 +7676,13 @@ packages:
resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==}
dev: true
+ /qs@6.13.0:
+ resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
+ engines: {node: '>=0.6'}
+ dependencies:
+ side-channel: 1.0.6
+ dev: false
+
/querystringify@2.2.0:
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
dev: true
@@ -7977,6 +8090,16 @@ packages:
dependencies:
queue-microtask: 1.2.3
+ /safe-array-concat@1.1.0:
+ resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==}
+ engines: {node: '>=0.4'}
+ dependencies:
+ call-bind: 1.0.7
+ get-intrinsic: 1.2.4
+ has-symbols: 1.0.3
+ isarray: 2.0.5
+ dev: true
+
/safe-array-concat@1.1.2:
resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==}
engines: {node: '>=0.4'}
@@ -8080,7 +8203,6 @@ packages:
get-intrinsic: 1.2.4
gopd: 1.0.1
has-property-descriptors: 1.0.2
- dev: true
/set-function-name@2.0.2:
resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==}
@@ -8131,7 +8253,6 @@ packages:
es-errors: 1.3.0
get-intrinsic: 1.2.4
object-inspect: 1.13.1
- dev: true
/signal-exit@3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
@@ -8355,6 +8476,15 @@ packages:
es-abstract: 1.23.3
dev: true
+ /string.prototype.trim@1.2.8:
+ resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.7
+ define-properties: 1.2.1
+ es-abstract: 1.23.3
+ dev: true
+
/string.prototype.trim@1.2.9:
resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==}
engines: {node: '>= 0.4'}
@@ -8365,6 +8495,14 @@ packages:
es-object-atoms: 1.0.0
dev: true
+ /string.prototype.trimend@1.0.7:
+ resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==}
+ dependencies:
+ call-bind: 1.0.7
+ define-properties: 1.2.1
+ es-abstract: 1.23.3
+ dev: true
+
/string.prototype.trimend@1.0.8:
resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==}
dependencies:
@@ -8373,6 +8511,14 @@ packages:
es-object-atoms: 1.0.0
dev: true
+ /string.prototype.trimstart@1.0.7:
+ resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==}
+ dependencies:
+ call-bind: 1.0.7
+ define-properties: 1.2.1
+ es-abstract: 1.23.3
+ dev: true
+
/string.prototype.trimstart@1.0.8:
resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==}
engines: {node: '>= 0.4'}
@@ -8747,6 +8893,15 @@ packages:
engines: {node: '>=10'}
dev: true
+ /typed-array-buffer@1.0.1:
+ resolution: {integrity: sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.7
+ es-errors: 1.3.0
+ is-typed-array: 1.1.13
+ dev: true
+
/typed-array-buffer@1.0.2:
resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==}
engines: {node: '>= 0.4'}
@@ -8756,6 +8911,16 @@ packages:
is-typed-array: 1.1.13
dev: true
+ /typed-array-byte-length@1.0.0:
+ resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.7
+ for-each: 0.3.3
+ has-proto: 1.0.3
+ is-typed-array: 1.1.13
+ dev: true
+
/typed-array-byte-length@1.0.1:
resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==}
engines: {node: '>= 0.4'}
@@ -8767,6 +8932,17 @@ packages:
is-typed-array: 1.1.13
dev: true
+ /typed-array-byte-offset@1.0.0:
+ resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ available-typed-arrays: 1.0.7
+ call-bind: 1.0.7
+ for-each: 0.3.3
+ has-proto: 1.0.3
+ is-typed-array: 1.1.13
+ dev: true
+
/typed-array-byte-offset@1.0.2:
resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==}
engines: {node: '>= 0.4'}
@@ -8779,6 +8955,14 @@ packages:
is-typed-array: 1.1.13
dev: true
+ /typed-array-length@1.0.4:
+ resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==}
+ dependencies:
+ call-bind: 1.0.7
+ for-each: 0.3.3
+ is-typed-array: 1.1.13
+ dev: true
+
/typed-array-length@1.0.6:
resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==}
engines: {node: '>= 0.4'}
@@ -9132,6 +9316,17 @@ packages:
is-weakset: 2.0.2
dev: true
+ /which-typed-array@1.1.14:
+ resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ available-typed-arrays: 1.0.7
+ call-bind: 1.0.7
+ for-each: 0.3.3
+ gopd: 1.0.1
+ has-tostringtag: 1.0.2
+ dev: true
+
/which-typed-array@1.1.15:
resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==}
engines: {node: '>= 0.4'}
@@ -9279,17 +9474,17 @@ packages:
engines: {node: '>=12.20'}
dev: true
- /zod-validation-error@3.3.1(zod@3.22.4):
+ /zod-validation-error@3.3.1(zod@3.23.8):
resolution: {integrity: sha512-uFzCZz7FQis256dqw4AhPQgD6f3pzNca/Zh62RNELavlumQB3nDIUFbF5JQfFLcMbO1s02Q7Xg/gpcOBlEnYZA==}
engines: {node: '>=18.0.0'}
peerDependencies:
zod: ^3.18.0
dependencies:
- zod: 3.22.4
+ zod: 3.23.8
dev: false
- /zod@3.22.4:
- resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==}
+ /zod@3.23.8:
+ resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
dev: false
/zustand@4.5.2(@types/react@18.2.37)(immer@10.0.3)(react@18.2.0):
diff --git a/src/common/Settings.tsx b/src/common/Settings.tsx
index a5fc5b2..cb95c0c 100644
--- a/src/common/Settings.tsx
+++ b/src/common/Settings.tsx
@@ -173,8 +173,7 @@ const Settings = ({ setInSettingsView }: SettingsProps) => {
- Most of Fuji’s capabilities are based on the GPT-4 Vision
- mode. Non-vision models are available for research purposes.
+ Fuji will operate in non-vision mode with the selected model.
)}
diff --git a/src/helpers/aiSdkUtils.ts b/src/helpers/aiSdkUtils.ts
index 2cfed85..7f03ce3 100644
--- a/src/helpers/aiSdkUtils.ts
+++ b/src/helpers/aiSdkUtils.ts
@@ -4,6 +4,8 @@ import { useAppState } from "../state/store";
import { enumValues } from "./utils";
export enum SupportedModels {
+ O1Preview = "o1-preview",
+ O1Mini = "o1-mini",
Gpt35Turbo16k = "gpt-3.5-turbo-16k",
Gpt4 = "gpt-4",
Gpt4TurboPreview = "gpt-4-turbo-preview",
@@ -23,6 +25,8 @@ function isSupportedModel(value: string): value is SupportedModels {
export const DEFAULT_MODEL = SupportedModels.Gpt4Turbo;
export const DisplayName = {
+ [SupportedModels.O1Preview]: "O1 Preview",
+ [SupportedModels.O1Mini]: "O1 Mini",
[SupportedModels.Gpt35Turbo16k]: "GPT-3.5 Turbo (16k)",
[SupportedModels.Gpt4]: "GPT-4",
[SupportedModels.Gpt4TurboPreview]: "GPT-4 Turbo (Preview)",
@@ -111,10 +115,21 @@ export async function fetchResponseFromModelOpenAI(
});
const messages: OpenAI.ChatCompletionMessageParam[] = [];
if (params.systemMessage != null) {
- messages.push({
- role: "system",
- content: params.systemMessage,
- });
+ // O1 does not support system message
+ if (
+ model === SupportedModels.O1Preview ||
+ model === SupportedModels.O1Mini
+ ) {
+ messages.push({
+ role: "user",
+ content: params.systemMessage,
+ });
+ } else {
+ messages.push({
+ role: "system",
+ content: params.systemMessage,
+ });
+ }
}
const content: OpenAI.ChatCompletionContentPart[] = [
{
@@ -143,8 +158,8 @@ export async function fetchResponseFromModelOpenAI(
const completion = await openai.chat.completions.create({
model: model,
messages,
- max_tokens: 1000,
- temperature: 0,
+ // max_completion_tokens: 1000,
+ // temperature: 0,
});
let rawResponse = completion.choices[0].message?.content?.trim() ?? "";
if (params.jsonMode && !rawResponse.startsWith("{")) {
diff --git a/src/helpers/rpc/domActions.ts b/src/helpers/rpc/domActions.ts
index e55d3de..baa9641 100644
--- a/src/helpers/rpc/domActions.ts
+++ b/src/helpers/rpc/domActions.ts
@@ -294,13 +294,14 @@ export class DomActions {
public async clickWithSelector(payload: {
selector: string;
}): Promise {
- const objectId = await this.getObjectIdBySelector(payload.selector);
- if (!objectId) {
- return false;
- }
- // await this.scrollIntoView(objectId);
- const { x, y } = await this.getCenterCoordinates(objectId);
- await this.clickAtPosition(x, y);
+ // const objectId = await this.getObjectIdBySelector(payload.selector);
+ // if (!objectId) {
+ // return false;
+ // }
+ // // await this.scrollIntoView(objectId);
+ // const { x, y } = await this.getCenterCoordinates(objectId);
+ // await this.clickAtPosition(x, y);
+ await callRPCWithTab(this.tabId, "clickWithSelector", [payload.selector]);
return true;
}
}
diff --git a/src/pages/content/domOperations.ts b/src/pages/content/domOperations.ts
index 00758a6..b8cb94c 100644
--- a/src/pages/content/domOperations.ts
+++ b/src/pages/content/domOperations.ts
@@ -10,7 +10,20 @@ import { getDataFromRenderedMarkdown } from "./reverseMarkdown";
import getViewportPercentage from "./getViewportPercentage";
import { injectMicrophonePermissionIframe } from "./permission";
+function clickWithSelector(selector: string) {
+ const element = document.querySelector(selector) as HTMLElement;
+ // get center coordinates of the element
+ const { x, y } = element.getBoundingClientRect();
+ const centerX = x + element.offsetWidth / 2;
+ const centerY = y + element.offsetHeight / 2;
+ ripple(centerX, centerY);
+ if (element) {
+ element.click();
+ }
+}
+
export const rpcMethods = {
+ clickWithSelector,
getAnnotatedDOM,
getUniqueElementSelectorId,
ripple,