Update docs#349
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| repository, | ||
| }: { | ||
| repository: RepositoryInfo; | ||
| } = await octokit.graphql(` |
There was a problem hiding this comment.
Why are you using gql out of interest? And where is this feedbacj going too?
There was a problem hiding this comment.
Because GH Discussions don't exist on the REST API. https://github.com/orgs/community/discussions/23483
The feedback opens a GH Discussion under the category defined in the environment variable. This is disabled until we get a new GH App to handle it (requested from IT).
|
|
||
| const search_docs = (writer: UIMessageStreamWriter) => | ||
| tool({ | ||
| description: 'Search through documentation content by query', |
There was a problem hiding this comment.
Should we be more explicit here and state the workflow documentation?
| (doc) => | ||
| `**${doc.title}**\nURL: ${doc.slug}\n${ | ||
| doc.description || '' | ||
| }\n\n${doc.content.slice(0, 1500)}${ |
There was a problem hiding this comment.
Is there a risk here that we cut off some page content?
|
|
||
| # Instructions | ||
| - Assume users are using Vercel products and open-source frameworks. | ||
| - Assume users are referring to Vercel products if they are not explicitly mentioned (e.g. Toolbar would refer to Vercel Toolbar). |
There was a problem hiding this comment.
This is too generic while we are using only these docs as context. Lets update to account for workflow docs in the examples
There was a problem hiding this comment.
I think this works fine until I figure out a way to expose an entry point from outside of Geistdocs.
| - The user is viewing \`${currentRoute}\`. If the question matches this page, use the \`get_doc_page\` tool with its slug. If ambiguous, default to fetching the current page first. | ||
| - If the answer isn't in the current page, use \`search_docs\` once per message to search the docs. | ||
| - Never use more than one tool call consecutively. | ||
| - After each tool call, validate the result in 1-2 lines and either proceed or self-correct if validation fails. |
There was a problem hiding this comment.
This feels like it just takes up extra tokens when we are not showing the reasoning in the chat. cc @nicoalbanese to confirm
There was a problem hiding this comment.
Context: these are the Vercel Docs instructions
| - Avoid code snippets unless absolutely necessary and only if identical to the source documentation—otherwise, link to documentation. | ||
| - If asked about Vercel open-source projects, direct users to the project's website. | ||
| - Ignore confrontational or controversial queries/statements. | ||
| - Politely refuse to respond to queries that do not relate to Vercel's documentation, guides, or tools. |
There was a problem hiding this comment.
Again here, while we are doing this per project, we should focus the examples to the docs site - workflow
This reverts commit 3852820.
There was a problem hiding this comment.
🔧 Build Fix:
The configuration file imports defineConfig from the main nitro package, but the nightly version of Nitro exports this function as defineNitroConfig from the nitro/config subpath. This causes a runtime error when attempting to load the config.
View Details
📝 Patch Details
diff --git a/workbench/nitro-v3/nitro.config.ts b/workbench/nitro-v3/nitro.config.ts
index 5e800f3..a832870 100644
--- a/workbench/nitro-v3/nitro.config.ts
+++ b/workbench/nitro-v3/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
serverDir: './',
});
Analysis
Incorrect Nitro config export in nitro-v3
What fails: The nitro build command fails in the @workflow/example-nitro-v3 package due to an incorrect import statement in the Nitro configuration file.
How to reproduce:
cd workbench/nitro-v3
pnpm run buildResult:
ERROR (0 , _nitro.defineConfig) is not a function
at nitro.config.ts:3:25
Why: In the nightly version of Nitro (v3.0.1+), the correct export function is defineNitroConfig from the 'nitro/config' subpath export, not defineConfig from the main 'nitro' export. The nitro-v2 example in the same repository correctly uses defineNitroConfig.
Reference: The Nitro nightly package exports defineNitroConfig from nitro/config entry point, as documented in the package's export configuration.
There was a problem hiding this comment.
🔧 Build Fix:
The defineConfig function is being imported from the nitro main entry point, but it's not exported there. The correct import should be defineNitroConfig from nitro/config, which is the function exported by the nitro-nightly package for configuration.
View Details
📝 Patch Details
diff --git a/workbench/hono/nitro.config.ts b/workbench/hono/nitro.config.ts
index f27eced..56ec6a2 100644
--- a/workbench/hono/nitro.config.ts
+++ b/workbench/hono/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
routes: {
'/**': './src/index.ts',
diff --git a/workbench/nitro-v3/nitro.config.ts b/workbench/nitro-v3/nitro.config.ts
index 5e800f3..a832870 100644
--- a/workbench/nitro-v3/nitro.config.ts
+++ b/workbench/nitro-v3/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
serverDir: './',
});
Analysis
Incorrect nitro config export in nitro.config.ts files
What fails: Nitro build fails with error (0 , _nitro.defineConfig) is not a function when running nitro build command in the hono and nitro-v3 workbench examples.
How to reproduce:
cd workbench/hono
pnpm run buildResult:
ERROR (0 , _nitro.defineConfig) is not a function
at nitro.config.ts:3:25
at async Function.import (...)
Root cause: The nitro-nightly package (3.0.1-20251031) exports the configuration function as defineNitroConfig from the nitro/config entry point, not as defineConfig from the main nitro entry point. The main nitro entry point exports nothing and attempting to import and use defineConfig from it results in undefined, causing the error.
Fix: Update the import and function call in both workbench/hono/nitro.config.ts and workbench/nitro-v3/nitro.config.ts to use defineNitroConfig from nitro/config instead of defineConfig from nitro.
https://unpkg.com/nitro-nightly@3.0.1-20251031-202656-883af4f9/lib/config.mjs
There was a problem hiding this comment.
🔧 Build Fix:
The defineConfig function is not exported from the nitro package in the nitro-nightly v3 version. The correct import is defineNitroConfig from nitro/config.
View Details
📝 Patch Details
diff --git a/workbench/hono/nitro.config.ts b/workbench/hono/nitro.config.ts
index f27eced..56ec6a2 100644
--- a/workbench/hono/nitro.config.ts
+++ b/workbench/hono/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
routes: {
'/**': './src/index.ts',
diff --git a/workbench/nitro-v3/nitro.config.ts b/workbench/nitro-v3/nitro.config.ts
index 5e800f3..a832870 100644
--- a/workbench/nitro-v3/nitro.config.ts
+++ b/workbench/nitro-v3/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
serverDir: './',
});
Analysis
Missing nitro/config import causes defineConfig error
What fails: The Nitro build fails because defineConfig is not exported from the nitro package in the nitro-nightly v3 version.
How to reproduce:
cd workbench/nitro-v3
pnpm run buildResult:
ERROR (0 , _nitro.defineConfig) is not a function
at nitro.config.ts:3:25
Fix: The function was renamed to defineNitroConfig and is exported from nitro/config in the nitro-nightly package. Changed imports from:
import { defineConfig } from 'nitro';to:
import { defineNitroConfig } from 'nitro/config';This fix was applied to both workbench/nitro-v3/nitro.config.ts and workbench/hono/nitro.config.ts which had the same issue.
Reference: The nitro-v2 example already uses this correct import pattern from nitropack/config.
There was a problem hiding this comment.
🔧 Build Fix:
The nitro configuration files import defineConfig from 'nitro', but this function doesn't exist in the main module export. In nitro-nightly@3.0.1, the function is called defineNitroConfig and must be imported from 'nitro/config'.
View Details
📝 Patch Details
diff --git a/workbench/hono/nitro.config.ts b/workbench/hono/nitro.config.ts
index f27eced..56ec6a2 100644
--- a/workbench/hono/nitro.config.ts
+++ b/workbench/hono/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
routes: {
'/**': './src/index.ts',
diff --git a/workbench/nitro-v3/nitro.config.ts b/workbench/nitro-v3/nitro.config.ts
index 5e800f3..a832870 100644
--- a/workbench/nitro-v3/nitro.config.ts
+++ b/workbench/nitro-v3/nitro.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'nitro';
+import { defineNitroConfig } from 'nitro/config';
-export default defineConfig({
+export default defineNitroConfig({
modules: ['workflow/nitro'],
serverDir: './',
});
Analysis
Nitro configuration import uses non-existent export
What fails: Nitro config loading fails when importing defineConfig from the main 'nitro' module, which doesn't export this function in nitro-nightly@3.0.1.
How to reproduce:
cd workbench/hono && pnpm run buildResult:
ERROR (0 , _nitro.defineConfig) is not a function
at nitro.config.ts:3:25
Root cause: The nitro-nightly package doesn't export defineConfig from its main export. The function is exported as defineNitroConfig from nitro/config. The nitro.config.ts files were importing from the wrong module path.
Fix: Updated the imports in both nitro.config.ts files to use the correct export path (nitro/config) and function name (defineNitroConfig).
adriandlam
left a comment
There was a problem hiding this comment.
nice migration. there's a merge conflict but otherwise lgtm
No description provided.