diff --git a/README.md b/README.md
index ca72f10260..feb827d3e9 100644
--- a/README.md
+++ b/README.md
@@ -13,10 +13,10 @@ Or fork & run on Vercel
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fenricoros%2Fbig-agi&env=OPENAI_API_KEY,OPENAI_API_HOST&envDescription=OpenAI%20KEY%20for%20your%20deployment.%20Set%20HOST%20only%20if%20non-default.)
-## πΊοΈ Explore the Roadmap
+## π [roadmap](https://github.com/users/enricoros/projects/4/views/2)
-The development of big-AGI is an open book. Our **[public roadmap](https://github.com/users/enricoros/projects/4/views/2)** is
-live, providing a detailed look at the current and future development of the application.
+big-AGI is an open book; our **[public roadmap](https://github.com/users/enricoros/projects/4/views/2)**
+shows the current developments and future ideas.
- Got a suggestion? [_Add your roadmap ideas_](https://github.com/enricoros/big-agi/issues/new?&template=roadmap-request.md)
- Want to contribute? [_Pick up a task!_](https://github.com/users/enricoros/projects/4/views/4) - _easy_ to _pro_
diff --git a/docs/changelog.md b/docs/changelog.md
index 1b2a389a25..e82ab4579d 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -2,10 +2,12 @@
This is a high-level changelog. Calls out some of the high level features batched
by release.
- - For the live roadmap, please see [the GitHub project](https://github.com/users/enricoros/projects/4/views/2)
+
+- For the live roadmap, please see [the GitHub project](https://github.com/users/enricoros/projects/4/views/2)
### 1.6.0 - Dec 2023
-- work in progress: [big-AGI open roadmap](https://github.com/users/enricoros/projects/4/views/2), [help here](https://github.com/users/enricoros/projects/4/views/4)
+
+- work in progress: [big-AGI open roadmap](https://github.com/users/enricoros/projects/4/views/2), [help here](https://github.com/users/enricoros/projects/4/views/4)
- milestone: [1.6.0](https://github.com/enricoros/big-agi/milestone/6)
### β¨ What's New in 1.5.0 π - Nov 19, 2023
@@ -20,6 +22,17 @@ by release.
- **Cloudflare OpenAI API Gateway**: Integrate with Cloudflare for a robust API gateway
- **Helicone for Anthropic**: Utilize Helicone's tools for Anthropic models
+For Developers:
+
+- Runtime Server-Side configuration: https://github.com/enricoros/big-agi/issues/189. Env vars are
+ not required to be set at build time anymore. The frontend will roundtrip to the backend at the
+ first request to get the configuration. See
+ https://github.com/enricoros/big-agi/blob/main/src/modules/backend/backend.router.ts.
+- CloudFlare developers: please change the deployment command to
+ `rm app/api/trpc-node/[trpc]/route.ts && npx @cloudflare/next-on-pages@1`,
+ as we transitioned to the App router in NextJS 14. The documentation in
+ [docs/deploy-cloudflare.md](../docs/deploy-cloudflare.md) is updated
+
### 1.4.0: Sept/Oct: scale OUT
- **Expanded Model Support**: Azure and [OpenRouter](https://openrouter.ai/docs#models) models, including gpt-4-32k
@@ -35,7 +48,7 @@ by release.
- **Backup/Restore** - save chats, and restore them later
- **[Local model support with Oobabooga server](../docs/config-local-oobabooga)** - run your own LLMs!
- **Flatten conversations** - conversations summarizer with 4 modes
-- **Fork conversations** - create a new chat, to experiment with different endings
+- **Fork conversations** - create a new chat, to try with different endings
- New commands: /s to add a System message, and /a for an Assistant message
- New Chat modes: Write-only - just appends the message, without assistant response
- Fix STOP generation - in sync with the Vercel team to fix a long-standing NextJS issue
diff --git a/docs/config-browse.md b/docs/config-browse.md
new file mode 100644
index 0000000000..040d77220a
--- /dev/null
+++ b/docs/config-browse.md
@@ -0,0 +1,64 @@
+# Browse Functionality in big-AGI π
+
+Allows users to load web pages across various components of `big-AGI`. This feature is supported by Puppeteer-based
+browsing services, which are the most common way to render web pages in a headless environment.
+
+First of all, you need to procure a Puppteer web browsing service endpoint. `big-AGI` supports services like:
+
+- [BrightData](https://brightdata.com/products/scraping-browser) Scraping Browser
+- [Cloudflare](https://developers.cloudflare.com/browser-rendering/) Browser Rendering, or
+- any other Puppeteer-based service that provides a WebSocket endpoint (WSS)
+- **including [your own browser](#your-own-chrome-browser)**
+
+## Configuration
+
+1. **Procure an Endpoint**: Ensure that your browsing service is running and has a WebSocket endpoint available:
+ - this mustbe in the form: `wss://${auth}@{some host}:{port}`
+
+2. **Configure `big-AGI`**: navigate to **Preferences** > **Tools** > **Browse** and enter the 'wss://...' connection
+ string provided by your browsing service
+
+3. **Enable Features**: Choose which browse-related features you want to enable:
+ - **Attach URLs**: Automatically load and attach a page when pasting a URL into the composer
+ - **/browse Command**: Use the `/browse` command in the chat to load a web page
+ - **ReAct**: Enable the `loadURL()` function in ReAct for advanced interactions
+
+### Server-Side Configuration
+
+You can set the Puppeteer WebSocket endpoint (`PUPPETEER_WSS_ENDPOINT`) in the deployment before running it.
+This is useful for self-hosted instances or when you want to pre-configure the endpoint for all users, and will
+allow your to skip points 2 and 3 above.
+
+Always deploy your own user authentication, authorization and security solution. For this feature, the tRPC
+route that provides browsing service, shall be secured with a user authentication and authorization solution,
+to prevent unauthorized access to the browsing service.
+
+### Your own Chrome browser
+
+***EXPERIMENTAL - UNTESTED*** - You can use your own Chrome browser as a browsing service, by configuring it to expose
+a WebSocket endpoint.
+
+- close all the Chrome instances (on Windows, check the Task Manager if still running)
+- start Chrome with the following command line options (on Windows, you can edit the shortcut properties):
+ - `--remote-debugging-port=9222`
+- go to http://localhost:9222/json/version and copy the `webSocketDebuggerUrl` value
+ - it should be something like: `ws://localhost:9222/...`
+- paste the value into the Endpoint configuration (see point 2 above)
+
+## Usage
+
+Once configured, you can start using the browse functionality:
+
+- **Paste a URL**: Simply paste a URL into the chat, and `big-AGI` will load the page if the Attach URLs feature is enabled
+- **Use /browse**: Type `/browse [URL]` in the chat to command `big-AGI` to load the specified web page
+- **ReAct**: ReAct will automatically use the `loadURL()` function whenever a URL is encountered
+
+## Support
+
+If you encounter any issues or have questions about configuring the browse functionality, join our community on Discord for support and discussions.
+
+[](https://discord.gg/MkH4qj2Jp9)
+
+---
+
+Enjoy the enhanced browsing experience within `big-AGI` and explore the web without ever leaving your chat!
\ No newline at end of file
diff --git a/docs/environment-variables.md b/docs/environment-variables.md
index ca357e6aa1..e4b504ca5d 100644
--- a/docs/environment-variables.md
+++ b/docs/environment-variables.md
@@ -43,6 +43,8 @@ PRODIA_API_KEY=
# Google Custom Search
GOOGLE_CLOUD_API_KEY=
GOOGLE_CSE_ID=
+# Browse
+PUPPETEER_WSS_ENDPOINT=
```
## Variables Documentation
@@ -104,6 +106,8 @@ Enable the app to Talk, Draw, and Google things up.
| `GOOGLE_CSE_ID` | Google Custom/Programmable Search Engine ID - [Link to PSE](https://programmablesearchengine.google.com/) |
| **Text-To-Image** | [Prodia](https://prodia.com/) is a reliable image generation service |
| `PRODIA_API_KEY` | Prodia API Key - used with '/imagine ...' |
+| **Browse** | |
+| `PUPPETEER_WSS_ENDPOINT` | Puppeteer WebSocket endpoint - used for browsing, etc. |
---
diff --git a/next.config.mjs b/next.config.mjs
index 07909cf0ec..7ae446c09b 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -9,6 +9,11 @@ let nextConfig = {
// },
// },
+ // [puppeteer] https://github.com/puppeteer/puppeteer/issues/11052
+ experimental: {
+ serverComponentsExternalPackages: ['puppeteer-core'],
+ },
+
webpack: (config, _options) => {
// @mui/joy: anything material gets redirected to Joy
config.resolve.alias['@mui/material'] = '@mui/joy';
diff --git a/package-lock.json b/package-lock.json
index 4a2698917b..0f4cb69e1a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,17 +14,17 @@
"@emotion/react": "^11.11.1",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.0",
- "@mui/icons-material": "^5.14.16",
+ "@mui/icons-material": "^5.14.18",
"@mui/joy": "^5.0.0-beta.15",
"@next/bundle-analyzer": "^14.0.3",
"@prisma/client": "^5.6.0",
"@sanity/diff-match-patch": "^3.1.1",
"@t3-oss/env-nextjs": "^0.7.1",
"@tanstack/react-query": "^4.36.1",
- "@trpc/client": "^10.44.0",
- "@trpc/next": "^10.44.0",
- "@trpc/react-query": "^10.44.0",
- "@trpc/server": "^10.44.0",
+ "@trpc/client": "^10.44.1",
+ "@trpc/next": "^10.44.1",
+ "@trpc/react-query": "^10.44.1",
+ "@trpc/server": "^10.44.1",
"@types/gapi": "^0.0.47",
"@types/gapi.client.bigquery": "^2.0.4",
"@types/google.accounts": "^0.0.14",
@@ -42,7 +42,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-katex": "^3.0.1",
- "react-markdown": "^9.0.0",
+ "react-markdown": "^9.0.1",
"react-timeago": "^7.2.0",
"remark-gfm": "^4.0.0",
"superjson": "^2.2.1",
@@ -52,11 +52,12 @@
"zustand": "~4.3.9"
},
"devDependencies": {
- "@types/node": "^20.9.3",
+ "@cloudflare/puppeteer": "^0.0.5",
+ "@types/node": "^20.10.0",
"@types/plantuml-encoder": "^1.4.2",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.2.38",
- "@types/react-dom": "^18.2.16",
+ "@types/react-dom": "^18.2.17",
"@types/react-katex": "^3.0.3",
"@types/react-timeago": "^4.1.6",
"@types/uuid": "^9.0.7",
@@ -283,6 +284,23 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@cloudflare/puppeteer": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/@cloudflare/puppeteer/-/puppeteer-0.0.5.tgz",
+ "integrity": "sha512-K+DLUmDVSM5UNzFokSqie0LPIFAPvdkLKHWnx8Gmck/M41387aCyLlUjWIeUGV3QifSRwaxTRfeMpELQW0lDZg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "4.3.4",
+ "devtools-protocol": "0.0.1019158",
+ "events": "3.3.0",
+ "stream": "0.0.2",
+ "url": "0.11.0",
+ "util": "0.12.5"
+ },
+ "engines": {
+ "node": ">=14.1.0"
+ }
+ },
"node_modules/@dqbd/tiktoken": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz",
@@ -1126,9 +1144,9 @@
"integrity": "sha512-UoFgbV1awGL/3wXuUK3GDaX2SolqczeeJ5b4FVec9tzeGbSWJboPSbT0psSrmgYAKiKnkOPFSLlH6+b+IyOwAw=="
},
"node_modules/@rushstack/eslint-patch": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz",
- "integrity": "sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.0.tgz",
+ "integrity": "sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA==",
"dev": true
},
"node_modules/@sanity/diff-match-patch": {
@@ -1214,20 +1232,20 @@
}
},
"node_modules/@trpc/client": {
- "version": "10.44.0",
- "resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.44.0.tgz",
- "integrity": "sha512-6PAL5rXMGTMlsKKGW9aBsij8XFBbLUbOCJ7jNVX3IripGqiQG3b/VJyTsHRWkss/oaz/sZMOn62amhfev1UVfg==",
+ "version": "10.44.1",
+ "resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.44.1.tgz",
+ "integrity": "sha512-vTWsykNcgz1LnwePVl2fKZnhvzP9N3GaaLYPkfGINo314ZOS0OBqe9x0ytB2LLUnRVTAAZ2WoONzARd8nHiqrA==",
"funding": [
"https://trpc.io/sponsor"
],
"peerDependencies": {
- "@trpc/server": "10.44.0"
+ "@trpc/server": "10.44.1"
}
},
"node_modules/@trpc/next": {
- "version": "10.44.0",
- "resolved": "https://registry.npmjs.org/@trpc/next/-/next-10.44.0.tgz",
- "integrity": "sha512-C4eKsSWdH0rUu0a0kUl+OC8RcI7DCsl3YZgXfKdPOEzRQ/njIgWWAouETRikzeHjulVN4/yz3ekcTyibfDNpKA==",
+ "version": "10.44.1",
+ "resolved": "https://registry.npmjs.org/@trpc/next/-/next-10.44.1.tgz",
+ "integrity": "sha512-ez2oYUzmaQ+pGch627sRBfeEk3h+UIwNicR8WjTAM54TPcdP5W9ZyWCyO5HZTEfjHgGixYM4tCIxewdKOWY9yA==",
"funding": [
"https://trpc.io/sponsor"
],
@@ -1236,33 +1254,33 @@
},
"peerDependencies": {
"@tanstack/react-query": "^4.18.0",
- "@trpc/client": "10.44.0",
- "@trpc/react-query": "10.44.0",
- "@trpc/server": "10.44.0",
+ "@trpc/client": "10.44.1",
+ "@trpc/react-query": "10.44.1",
+ "@trpc/server": "10.44.1",
"next": "*",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
}
},
"node_modules/@trpc/react-query": {
- "version": "10.44.0",
- "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-10.44.0.tgz",
- "integrity": "sha512-0l9mar1kSamm/sePnHOuhX8v9LFQbgpVJ2U2s/hWnScNexBFzV03SpCjLAkXtiIapw5lkIG0QlveZXu4G86Xnw==",
+ "version": "10.44.1",
+ "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-10.44.1.tgz",
+ "integrity": "sha512-Sgi/v0YtdunOXjBRi7om9gILGkOCFYXPzn5KqLuEHiZw5dr5w4qGHFwCeMAvndZxmwfblJrl1tk2AznmsVu8MA==",
"funding": [
"https://trpc.io/sponsor"
],
"peerDependencies": {
"@tanstack/react-query": "^4.18.0",
- "@trpc/client": "10.44.0",
- "@trpc/server": "10.44.0",
+ "@trpc/client": "10.44.1",
+ "@trpc/server": "10.44.1",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
}
},
"node_modules/@trpc/server": {
- "version": "10.44.0",
- "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.44.0.tgz",
- "integrity": "sha512-QBq/FnjyU6a7CAl9p2dv6kApn2i8MFuPt8uVLyGr0oa2aFv31rHaX0m+ibdsviE/3fOJIC8EUOfMYOJma5uK2w==",
+ "version": "10.44.1",
+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.44.1.tgz",
+ "integrity": "sha512-mF7B+K6LjuboX8I1RZgKE5GA/fJhsJ8tKGK2UBt3Bwik7hepEPb4NJgNr7vO6BK5IYwPdBLRLTctRw6XZx0sRg==",
"funding": [
"https://trpc.io/sponsor"
],
@@ -1338,9 +1356,9 @@
"integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="
},
"node_modules/@types/node": {
- "version": "20.9.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.3.tgz",
- "integrity": "sha512-nk5wXLAXGBKfrhLB0cyHGbSqopS+nz0BUgZkUQqSHSSgdee0kssp1IAqlQOu333bW+gMNs2QREx7iynm19Abxw==",
+ "version": "20.10.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz",
+ "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@@ -1382,9 +1400,9 @@
}
},
"node_modules/@types/react-dom": {
- "version": "18.2.16",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.16.tgz",
- "integrity": "sha512-766c37araZ9vxtYs25gvY2wNdFWsT2ZiUvOd0zMhTaoGj6B911N8CKQWgXXJoPMLF3J82thpRqQA7Rf3rBwyJw==",
+ "version": "18.2.17",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz",
+ "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==",
"dev": true,
"dependencies": {
"@types/react": "*"
@@ -1418,9 +1436,9 @@
}
},
"node_modules/@types/scheduler": {
- "version": "0.16.7",
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.7.tgz",
- "integrity": "sha512-8g25Nl3AuB1KulTlSUsUhUo/oBgBU6XIXQ+XURpeioEbEJvkO7qI4vDfREv3vJYHHzqXjcAHvoJy4pTtSQNZtA=="
+ "version": "0.16.8",
+ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
+ "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A=="
},
"node_modules/@types/unist": {
"version": "3.0.2",
@@ -1988,9 +2006,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001563",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz",
- "integrity": "sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==",
+ "version": "1.0.30001564",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz",
+ "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==",
"funding": [
{
"type": "opencollective",
@@ -2306,6 +2324,12 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/devtools-protocol": {
+ "version": "0.0.1019158",
+ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1019158.tgz",
+ "integrity": "sha512-wvq+KscQ7/6spEV7czhnZc9RM/woz1AY+/Vpd8/h2HFMwJSdTliu7f/yr1A6vDdJfKICZsShqsYpEQbdhg8AFQ==",
+ "dev": true
+ },
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -2385,6 +2409,15 @@
"safe-buffer": "~5.1.0"
}
},
+ "node_modules/emitter-component": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.2.tgz",
+ "integrity": "sha512-QdXO3nXOzZB4pAjM0n6ZE+R9/+kPpECA/XSELIcc54NeYVnBqIk+4DFiBgK+8QbV3mdvTG6nedl7dTYgO+5wDw==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
@@ -2948,6 +2981,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
"node_modules/eventsource-parser": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.1.1.tgz",
@@ -3581,6 +3623,22 @@
"node": ">= 0.4"
}
},
+ "node_modules/is-arguments": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
+ "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-array-buffer": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
@@ -5584,6 +5642,16 @@
"node": ">=6"
}
},
+ "node_modules/querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==",
+ "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.x"
+ }
+ },
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -6137,6 +6205,15 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/stream": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz",
+ "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==",
+ "dev": true,
+ "dependencies": {
+ "emitter-component": "^1.1.1"
+ }
+ },
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
@@ -6703,6 +6780,22 @@
"punycode": "^2.1.0"
}
},
+ "node_modules/url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ }
+ },
+ "node_modules/url/node_modules/punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==",
+ "dev": true
+ },
"node_modules/use-sync-external-store": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
@@ -6711,6 +6804,19 @@
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
+ "node_modules/util": {
+ "version": "0.12.5",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",
+ "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "is-arguments": "^1.0.4",
+ "is-generator-function": "^1.0.7",
+ "is-typed-array": "^1.1.3",
+ "which-typed-array": "^1.1.2"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/package.json b/package.json
index 9854ece909..5e74e81b7f 100644
--- a/package.json
+++ b/package.json
@@ -18,17 +18,17 @@
"@emotion/react": "^11.11.1",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.0",
- "@mui/icons-material": "^5.14.16",
+ "@mui/icons-material": "^5.14.18",
"@mui/joy": "^5.0.0-beta.15",
"@next/bundle-analyzer": "^14.0.3",
"@prisma/client": "^5.6.0",
"@sanity/diff-match-patch": "^3.1.1",
"@t3-oss/env-nextjs": "^0.7.1",
"@tanstack/react-query": "^4.36.1",
- "@trpc/client": "^10.44.0",
- "@trpc/next": "^10.44.0",
- "@trpc/react-query": "^10.44.0",
- "@trpc/server": "^10.44.0",
+ "@trpc/client": "^10.44.1",
+ "@trpc/next": "^10.44.1",
+ "@trpc/react-query": "^10.44.1",
+ "@trpc/server": "^10.44.1",
"@types/gapi": "^0.0.47",
"@types/gapi.client.bigquery": "^2.0.4",
"@types/google.accounts": "^0.0.14",
@@ -46,7 +46,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-katex": "^3.0.1",
- "react-markdown": "^9.0.0",
+ "react-markdown": "^9.0.1",
"react-timeago": "^7.2.0",
"remark-gfm": "^4.0.0",
"superjson": "^2.2.1",
@@ -56,11 +56,12 @@
"zustand": "~4.3.9"
},
"devDependencies": {
- "@types/node": "^20.9.3",
+ "@cloudflare/puppeteer": "^0.0.5",
+ "@types/node": "^20.10.0",
"@types/plantuml-encoder": "^1.4.2",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.2.38",
- "@types/react-dom": "^18.2.16",
+ "@types/react-dom": "^18.2.17",
"@types/react-katex": "^3.0.3",
"@types/react-timeago": "^4.1.6",
"@types/uuid": "^9.0.7",
diff --git a/pages/labs.tsx b/pages/labs.tsx
deleted file mode 100644
index 0efb28f6fd..0000000000
--- a/pages/labs.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import * as React from 'react';
-
-import { AppLabs } from '../src/apps/labs/AppLabs';
-
-import { AppLayout } from '~/common/layout/AppLayout';
-
-
-export default function LabsPage() {
- return (
-
-
-
- );
-}
\ No newline at end of file
diff --git a/pages/launch.tsx b/pages/link/share_target.tsx
similarity index 85%
rename from pages/launch.tsx
rename to pages/link/share_target.tsx
index a25fbf174f..79326a7a8b 100644
--- a/pages/launch.tsx
+++ b/pages/link/share_target.tsx
@@ -4,11 +4,14 @@ import { useRouter } from 'next/router';
import { Alert, Box, Button, Typography } from '@mui/joy';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
-import { setComposerStartupText } from '../src/apps/chat/components/composer/store-composer';
+import { setComposerStartupText } from '../../src/apps/chat/components/composer/store-composer';
+
+import { callBrowseFetchPage } from '~/modules/browse/browse.client';
import { AppLayout } from '~/common/layout/AppLayout';
import { LogoProgress } from '~/common/components/LogoProgress';
import { asValidURL } from '~/common/util/urlUtils';
+import { navigateToIndex } from '~/common/app.routes';
/**
@@ -28,13 +31,13 @@ function AppShareTarget() {
const [isDownloading, setIsDownloading] = React.useState(false);
// external state
- const { query, push: routerPush, replace: routerReplace } = useRouter();
+ const { query } = useRouter();
const queueComposerTextAndLaunchApp = React.useCallback((text: string) => {
setComposerStartupText(text);
- void routerReplace('/');
- }, [routerReplace]);
+ void navigateToIndex(true);
+ }, []);
// Detect the share Intent from the query
@@ -71,10 +74,7 @@ function AppShareTarget() {
React.useEffect(() => {
if (intentURL) {
setIsDownloading(true);
- // TEMP: until the Browse module is ready, just use the URL, verbatim
- queueComposerTextAndLaunchApp(intentURL);
- setIsDownloading(false);
- /*callBrowseFetchSinglePage(intentURL)
+ callBrowseFetchPage(intentURL)
.then(pageContent => {
if (pageContent)
queueComposerTextAndLaunchApp('\n\n```' + intentURL + '\n' + pageContent + '\n```\n');
@@ -82,7 +82,7 @@ function AppShareTarget() {
setErrorMessage('Could not read any data');
})
.catch(error => setErrorMessage(error?.message || error || 'Unknown error'))
- .finally(() => setIsDownloading(false));*/
+ .finally(() => setIsDownloading(false));
}
}, [intentURL, queueComposerTextAndLaunchApp]);
@@ -110,7 +110,7 @@ function AppShareTarget() {