Browser agent
libfx runs in this browser through WebAssembly. Reload to start a new conversation.
diff --git a/cookbook/browser-agent/main.js b/examples/browser-agent/main.js similarity index 100% rename from cookbook/browser-agent/main.js rename to examples/browser-agent/main.js diff --git a/cookbook/browser-agent/package-lock.json b/examples/browser-agent/package-lock.json similarity index 100% rename from cookbook/browser-agent/package-lock.json rename to examples/browser-agent/package-lock.json diff --git a/cookbook/browser-agent/package.json b/examples/browser-agent/package.json similarity index 100% rename from cookbook/browser-agent/package.json rename to examples/browser-agent/package.json diff --git a/cookbook/examples.json b/examples/examples.json similarity index 100% rename from cookbook/examples.json rename to examples/examples.json diff --git a/cookbook/nextjs-agent/app/api/chat/route.js b/examples/nextjs-agent/app/api/chat/route.js similarity index 100% rename from cookbook/nextjs-agent/app/api/chat/route.js rename to examples/nextjs-agent/app/api/chat/route.js diff --git a/cookbook/nextjs-agent/app/layout.js b/examples/nextjs-agent/app/layout.js similarity index 62% rename from cookbook/nextjs-agent/app/layout.js rename to examples/nextjs-agent/app/layout.js index 55ac73305..70f076294 100644 --- a/cookbook/nextjs-agent/app/layout.js +++ b/examples/nextjs-agent/app/layout.js @@ -1,4 +1,4 @@ -export const metadata = { title: 'Next.js agent · fx cookbook' } +export const metadata = { title: 'Next.js agent · fx examples' } export default function Layout({ children }) { return {children} diff --git a/cookbook/nextjs-agent/app/page.js b/examples/nextjs-agent/app/page.js similarity index 100% rename from cookbook/nextjs-agent/app/page.js rename to examples/nextjs-agent/app/page.js diff --git a/examples/nextjs-agent/next.config.mjs b/examples/nextjs-agent/next.config.mjs new file mode 100644 index 000000000..2e314113f --- /dev/null +++ b/examples/nextjs-agent/next.config.mjs @@ -0,0 +1,7 @@ +import { fileURLToPath } from 'node:url' + +const examplesRoot = fileURLToPath(new URL('..', import.meta.url)) +export default { + turbopack: { root: examplesRoot }, + outputFileTracingRoot: examplesRoot, +} diff --git a/cookbook/nextjs-agent/package-lock.json b/examples/nextjs-agent/package-lock.json similarity index 100% rename from cookbook/nextjs-agent/package-lock.json rename to examples/nextjs-agent/package-lock.json diff --git a/cookbook/nextjs-agent/package.json b/examples/nextjs-agent/package.json similarity index 100% rename from cookbook/nextjs-agent/package.json rename to examples/nextjs-agent/package.json diff --git a/cookbook/node-chat/chat.mjs b/examples/node-chat/chat.mjs similarity index 100% rename from cookbook/node-chat/chat.mjs rename to examples/node-chat/chat.mjs diff --git a/cookbook/node-chat/handler.mjs b/examples/node-chat/handler.mjs similarity index 100% rename from cookbook/node-chat/handler.mjs rename to examples/node-chat/handler.mjs diff --git a/cookbook/node-chat/index.html b/examples/node-chat/index.html similarity index 97% rename from cookbook/node-chat/index.html rename to examples/node-chat/index.html index 7bbf983fb..21cfe6af6 100644 --- a/cookbook/node-chat/index.html +++ b/examples/node-chat/index.html @@ -2,7 +2,7 @@ -Node.js agent
A native libfx agent. Each request starts a new conversation.
diff --git a/cookbook/node-chat/package-lock.json b/examples/node-chat/package-lock.json similarity index 100% rename from cookbook/node-chat/package-lock.json rename to examples/node-chat/package-lock.json diff --git a/cookbook/node-chat/package.json b/examples/node-chat/package.json similarity index 100% rename from cookbook/node-chat/package.json rename to examples/node-chat/package.json diff --git a/cookbook/node-chat/server.mjs b/examples/node-chat/server.mjs similarity index 100% rename from cookbook/node-chat/server.mjs rename to examples/node-chat/server.mjs diff --git a/cookbook/nuxt-agent/app/app.vue b/examples/nuxt-agent/app/app.vue similarity index 96% rename from cookbook/nuxt-agent/app/app.vue rename to examples/nuxt-agent/app/app.vue index 964261066..c1b92d86b 100644 --- a/cookbook/nuxt-agent/app/app.vue +++ b/examples/nuxt-agent/app/app.vue @@ -7,7 +7,7 @@ const status = ref('') const busy = ref(false) const ready = ref(false) onMounted(() => { ready.value = true }) -useHead({ title: 'Nuxt agent · fx cookbook', htmlAttrs: { lang: 'en' } }) +useHead({ title: 'Nuxt agent · fx examples', htmlAttrs: { lang: 'en' } }) async function send() { busy.value = true diff --git a/cookbook/nuxt-agent/nuxt.config.ts b/examples/nuxt-agent/nuxt.config.ts similarity index 100% rename from cookbook/nuxt-agent/nuxt.config.ts rename to examples/nuxt-agent/nuxt.config.ts diff --git a/cookbook/nuxt-agent/package-lock.json b/examples/nuxt-agent/package-lock.json similarity index 100% rename from cookbook/nuxt-agent/package-lock.json rename to examples/nuxt-agent/package-lock.json diff --git a/cookbook/nuxt-agent/package.json b/examples/nuxt-agent/package.json similarity index 100% rename from cookbook/nuxt-agent/package.json rename to examples/nuxt-agent/package.json diff --git a/cookbook/nuxt-agent/server/api/chat.post.js b/examples/nuxt-agent/server/api/chat.post.js similarity index 100% rename from cookbook/nuxt-agent/server/api/chat.post.js rename to examples/nuxt-agent/server/api/chat.post.js diff --git a/cookbook/shared/gateway.mjs b/examples/shared/gateway.mjs similarity index 100% rename from cookbook/shared/gateway.mjs rename to examples/shared/gateway.mjs diff --git a/cookbook/shared/gateway.test.mjs b/examples/shared/gateway.test.mjs similarity index 100% rename from cookbook/shared/gateway.test.mjs rename to examples/shared/gateway.test.mjs diff --git a/cookbook/shared/model.mjs b/examples/shared/model.mjs similarity index 100% rename from cookbook/shared/model.mjs rename to examples/shared/model.mjs diff --git a/cookbook/shared/read-reply.mjs b/examples/shared/read-reply.mjs similarity index 100% rename from cookbook/shared/read-reply.mjs rename to examples/shared/read-reply.mjs diff --git a/cookbook/shared/read-reply.test.mjs b/examples/shared/read-reply.test.mjs similarity index 100% rename from cookbook/shared/read-reply.test.mjs rename to examples/shared/read-reply.test.mjs