diff --git a/core/package-lock.json b/core/package-lock.json index 71372470f..0a01b07f3 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -65,7 +65,6 @@ "@biomejs/biome": "1.6.4", "@google/generative-ai": "^0.11.4", "@types/follow-redirects": "^1.14.4", - "@types/isomorphic-fetch": "^0.0.39", "@types/jest": "^29.5.12", "@types/jquery": "^3.5.29", "@types/jsdom": "^21.1.6", @@ -80,7 +79,6 @@ "esbuild": "0.17.19", "eslint": "^8", "eslint-plugin-import": "^2.29.1", - "isomorphic-fetch": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "myers-diff": "^2.1.0", @@ -4363,12 +4361,6 @@ "@types/node": "*" } }, - "node_modules/@types/isomorphic-fetch": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.39.tgz", - "integrity": "sha512-I0gou/ZdA1vMG7t7gMzL7VYu2xAKU78rW9U1l10MI0nn77pEHq3tQqHQ8hMmXdMpBlkxZOorjI4sO594Z3kKJw==", - "dev": true - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -8598,58 +8590,6 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, - "node_modules/isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, - "node_modules/isomorphic-fetch/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/isomorphic-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/isomorphic-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/isomorphic-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", diff --git a/gui/src/components/HeaderButtonWithText.tsx b/gui/src/components/HeaderButtonWithText.tsx index 9c5647a91..9af9a4236 100644 --- a/gui/src/components/HeaderButtonWithText.tsx +++ b/gui/src/components/HeaderButtonWithText.tsx @@ -1,6 +1,7 @@ import React, { useState } from "react"; import ReactDOM from "react-dom"; import { HeaderButton, StyledTooltip } from "."; +import { type PlacesType } from "react-tooltip"; import { v4 as uuidv4 } from "uuid"; @@ -17,6 +18,7 @@ interface HeaderButtonWithTextProps { style?: React.CSSProperties; backgroundColor?: string; hoverBackgroundColor?: string; + tooltipPlacement?: PlacesType; } const HeaderButtonWithText = React.forwardRef< @@ -27,13 +29,14 @@ const HeaderButtonWithText = React.forwardRef< const id = uuidv4(); const tooltipPortalDiv = document.getElementById("tooltip-portal-div"); + const tooltipId = `header_button_${id}`; return ( <> { @@ -56,7 +59,10 @@ const HeaderButtonWithText = React.forwardRef< {props.text && tooltipPortalDiv && ReactDOM.createPortal( - + {props.text} , tooltipPortalDiv, diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 2ce44d6c1..30208b95d 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -285,6 +285,7 @@ const Layout = () => { { if (location.pathname === "/help") { diff --git a/gui/src/components/ProfileSwitcher.tsx b/gui/src/components/ProfileSwitcher.tsx index 140178883..b9789acc4 100644 --- a/gui/src/components/ProfileSwitcher.tsx +++ b/gui/src/components/ProfileSwitcher.tsx @@ -219,6 +219,7 @@ function ProfileSwitcher(props: {}) { {/* Settings button (either opens config.json or /settings page in control plane) */} { if (selectedProfileId === "local") { ideMessenger.post("openConfigJson", undefined); @@ -237,6 +238,7 @@ function ProfileSwitcher(props: {}) { {/* Only show login if beta explicitly enabled */} {controlServerBetaEnabled && ( void; - editorState?: JSONContent; contextItems?: ContextItemWithId[]; hidden?: boolean; diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index f686c0bd4..510daa368 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -1,4 +1,7 @@ -import { PhotoIcon as OutlinePhotoIcon } from "@heroicons/react/24/outline"; +import { + PhotoIcon as OutlinePhotoIcon, + PlusIcon, +} from "@heroicons/react/24/outline"; import { PhotoIcon as SolidPhotoIcon } from "@heroicons/react/24/solid"; import { InputModifiers } from "core"; import { modelSupportsImages } from "core/llm/autodetect"; @@ -106,7 +109,7 @@ function InputToolbar(props: InputToolbarProps) { }} className="hover:underline cursor-pointer" > - + Add Context + Add Context