-
Notifications
You must be signed in to change notification settings - Fork 274
copy prompt #2493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
copy prompt #2493
Conversation
WalkthroughAdds a new PromptBanner Svelte component (public prop: Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@CodeRabbit review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
src/prompts/quickstarts/nextjs.md (2)
5-14
: Package manager guidance conflicts with hardcoded npm commandsYou ask to respect the user’s package manager but then force npm (
--use-npm
,npx
,npm install
). Offer variants and avoid locking to npm.Apply something like:
-Respect user's package manager at all time. Don't use NPM if the user uses something else. +Respect the user's package manager at all times. If the user prefers Yarn, pnpm, or Bun, use that instead of npm. @@ -1. Create Next.js app - - Run: npx create-next-app@latest my-app --use-npm --no-tailwind --eslint +1. Create Next.js app + - npm: npx create-next-app@latest my-app --no-tailwind --eslint + - pnpm: pnpm dlx create-next-app@latest my-app --no-tailwind --eslint + - yarn: yarn create next-app my-app --no-tailwind --eslint + - bun: bunx create-next-app@latest my-app --no-tailwind --eslint @@ -2. Install Appwrite SDK - - Run: npm install appwrite +2. Install Appwrite SDK + - npm: npm install appwrite + - pnpm: pnpm add appwrite + - yarn: yarn add appwrite + - bun: bun add appwrite
58-63
: Minor wording and lint nits
- Use “auto‑login” (hyphen).
- Avoid bare URLs to satisfy MD034: wrap as a link or use angle brackets.
Proposed tweaks:
-- Open: http://localhost:3000 +- Open: <http://localhost:3000> @@ - - Register a new user and auto login works + - Register a new user and auto‑login workssrc/markdoc/layouts/Article.svelte (1)
92-95
: Consider placing the banner within metadata (optional)If you want the banner aligned with difficulty/readtime, render it inside the metadata slot; current placement shows it under the metadata list. Up to design.
src/lib/components/PromptBanner.svelte (1)
24-66
: Harden external openings; remove debug; clean up menu logic
- Remove
console.log(text)
to avoid leaking prompt content.- Use
noopener,noreferrer
withwindow.open
to prevent reverse‑tabnabbing.- Deep‑link fallback: assigning
window.location.href
won’t throw; use a timeout + blur fallback to copy on failure.selected
is never read; drop it. Also consider removingforceVisible: true
unless required.- let selected: Ide = 'copy'; + // no local selection state needed - } = createDropdownMenu({ - forceVisible: true, + } = createDropdownMenu({ positioning: { placement: 'bottom-end' } }); @@ - const url = `cursor://anysphere.cursor-deeplink/prompt?text=${text}`; - console.log(text); - try { - window.location.href = url; - } catch { - copy(); - } + const url = `cursor://anysphere.cursor-deeplink/prompt?text=${text}`; + const failSafe = setTimeout(() => copy(), 1200); + // If the OS handles the scheme, the page will blur; cancel fallback. + const onBlur = () => clearTimeout(failSafe); + window.addEventListener('blur', onBlur, { once: true }); + window.location.href = url; return; } @@ - const url = `https://chatgpt.com/?prompt=${text}`; - window.open(url, '_blank'); + const url = `https://chatgpt.com/?prompt=${text}`; + window.open(url, '_blank', 'noopener,noreferrer'); return; } @@ - const url = `https://claude.ai/new?q=${text}`; - window.open(url, '_blank'); + const url = `https://claude.ai/new?q=${text}`; + window.open(url, '_blank', 'noopener,noreferrer'); return; }src/lib/utils/prompts.ts (2)
4-8
: Useas: 'raw'
and restrict to text extensionsSafer and clearer in Vite to load raw text and avoid pulling non‑text files.
-const promptsGlob = import.meta.glob('/src/prompts/**/*', { - query: '?raw', - import: 'default', - eager: true -}) as Record<string, string>; +const promptsGlob = import.meta.glob('/src/prompts/**/*.{md,mdx,txt}', { + as: 'raw', + eager: true +}) as Record<string, string>;
29-41
: API looks good; add a tiny enhancement (optional)Consider exporting
type PromptKey = string
and documenting that keys are relative tosrc/prompts/
, to guide callers and reduce misuse. Also optionally expose aprefix
filter forlistPrompts(prefix?: string)
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
static/images/docs/mcp/logos/dark/openai.svg
is excluded by!**/*.svg
static/images/docs/mcp/logos/openai.svg
is excluded by!**/*.svg
📒 Files selected for processing (5)
src/lib/components/PromptBanner.svelte
(1 hunks)src/lib/utils/prompts.ts
(1 hunks)src/markdoc/layouts/Article.svelte
(3 hunks)src/prompts/quickstarts/nextjs.md
(1 hunks)src/routes/docs/quick-starts/nextjs/+page.markdoc
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/prompts/quickstarts/nextjs.md
[grammar] ~8-~8: There might be a mistake here.
Context: ... my-app --use-npm --no-tailwind --eslint - Change dir: cd my-app - When prompte...
(QB_NEW_EN)
[grammar] ~9-~9: There might be a mistake here.
Context: ...ind --eslint - Change dir: cd my-app - When prompted: TypeScript = No, ESLint =...
(QB_NEW_EN)
[grammar] ~15-~15: There might be a mistake here.
Context: ...rite 3. Create Appwrite client module (ask user for details; never assume) - A...
(QB_NEW_EN)
[grammar] ~16-~16: There might be a mistake here.
Context: ...s; never assume) - Ask the user for: - Appwrite Cloud Region (e.g. fra, nyc) ...
(QB_NEW_EN)
[grammar] ~17-~17: There might be a mistake here.
Context: ... - Appwrite Cloud Region (e.g. fra, nyc) - Project ID (from Console → Settings) ...
(QB_NEW_EN)
[grammar] ~19-~19: There might be a mistake here.
Context: ... If the user doesn’t know, guide them to Appwrite Console to copy these. Do not ...
(QB_NEW_EN)
[grammar] ~24-~24: There might be a mistake here.
Context: ...rite.js (or app/appwrite.ts if TS) with: import { Client, Account } from 'appwrit...
(QB_NEW_EN)
[grammar] ~31-~31: There might be a mistake here.
Context: ...ITE_PROJECT_ID. Please add them to .env.local'); } export const clien...
(QB_NEW_EN)
[grammar] ~43-~43: There might be a mistake here.
Context: ...sing "use client". - It must render: - Email/password inputs - Name inp...
(QB_NEW_EN)
[grammar] ~44-~44: There might be a mistake here.
Context: ... render: - Email/password inputs - Name input for registration - Bu...
(QB_NEW_EN)
[grammar] ~45-~45: There might be a mistake here.
Context: ...ts - Name input for registration - Buttons: Login, Register, Logout ...
(QB_NEW_EN)
[grammar] ~46-~46: There might be a mistake here.
Context: ... - Buttons: Login, Register, Logout - Shows "Logged in as " when a sessi...
(QB_NEW_EN)
[grammar] ~47-~47: There might be a mistake here.
Context: ...gged in as " when a session exists - Implement functions: - login(ema...
(QB_NEW_EN)
[grammar] ~48-~48: There might be a mistake here.
Context: ...ession exists - Implement functions: - login(email, password): account.createEm...
(QB_NEW_EN)
[grammar] ~49-~49: There might be a mistake here.
Context: ...sword }) then set user via account.get() - register(): account.create({ userId: ID....
(QB_NEW_EN)
[grammar] ~50-~50: There might be a mistake here.
Context: ...email, password, name }) then call login - logout(): account.deleteSession({ sessio...
(QB_NEW_EN)
[grammar] ~54-~54: There might be a mistake here.
Context: ...ins the correct endpoint and project ID. - Ensure the Web app platform exists in Ap...
(QB_NEW_EN)
[grammar] ~58-~58: There might be a mistake here.
Context: ... 6. Run and test - Run: npm run dev - Open: http://localhost:3000 - Test f...
(QB_NEW_EN)
[grammar] ~59-~59: There might be a mistake here.
Context: ...un dev - Open: http://localhost:3000 - Test flows: - Register a new use...
(QB_NEW_EN)
[grammar] ~60-~60: There might be a mistake here.
Context: ... http://localhost:3000 - Test flows: - Register a new user and auto login works...
(QB_NEW_EN)
[grammar] ~61-~61: Use a hyphen to join words.
Context: ...: - Register a new user and auto login works - Logout then login ...
(QB_NEW_EN_HYPHEN)
[grammar] ~66-~66: There might be a mistake here.
Context: ...e.ts and app/page.tsx with proper types. - Add minimal styling if requested; functi...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.18.1)
src/prompts/quickstarts/nextjs.md
59-59: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: tests
🔇 Additional comments (2)
src/routes/docs/quick-starts/nextjs/+page.markdoc (1)
8-8
: Front matter wiring looks correct
prompt: quickstarts/nextjs.md
matches the expected key format (relative tosrc/prompts
). Good addition.src/markdoc/layouts/Article.svelte (1)
21-34
: Prop and import are sound
prompt?: string
and importingPromptBanner
is clean and type‑safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 20
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/routes/docs/quick-starts/nuxt/+page.markdoc (1)
41-43
: Fix CLI typo ("cd my app" → "cd my-app").This breaks copy-paste flow.
Apply:
-npx nuxi@latest init my-app && cd my app +npx nuxi@latest init my-app && cd my-app
🧹 Nitpick comments (6)
src/prompts/quickstarts/android.md (2)
37-37
: Qualify ID usage for clarity.The snippet uses ID without an import; prefer fully‑qualified call or show the import.
- suspend fun register(email: String, password: String) = account.create(userId = ID.unique(), email = email, password = password) + suspend fun register(email: String, password: String) = + account.create(userId = io.appwrite.ID.unique(), email = email, password = password)Alternatively, add:
import io.appwrite.ID
32-35
: Guard against blank config values.Validate region/projectId to fail fast with a clear error.
fun init(ctx: Context, region: String, projectId: String){ + require(region.isNotBlank()) { "Appwrite region must not be blank" } + require(projectId.isNotBlank()) { "Appwrite projectId must not be blank" } client = Client(ctx).setEndpoint("https://$region.cloud.appwrite.io/v1").setProject(projectId) account = Account(client) }src/prompts/quickstarts/android-java.md (1)
80-84
: UI thread handoff for callbacks.If callbacks run off the main thread, wrap UI updates with runOnUiThread or use a main-thread handler.
src/prompts/quickstarts/nuxt.md (1)
24-33
: Useimport.meta.env
for client env in Nuxt 3 utilities.
process.env
can be undefined in client bundles. Preferimport.meta.env.NUXT_PUBLIC_*
.Apply:
- const endpoint = process.env.NUXT_PUBLIC_APPWRITE_ENDPOINT; - const projectId = process.env.NUXT_PUBLIC_APPWRITE_PROJECT_ID; + const endpoint = import.meta.env.NUXT_PUBLIC_APPWRITE_ENDPOINT; + const projectId = import.meta.env.NUXT_PUBLIC_APPWRITE_PROJECT_ID;Optionally, validate and throw as you already do.
src/lib/components/PromptBanner.svelte (2)
11-16
: Optional: make prompt/existence reactive.If
promptName
can change, recomputeprompt
/exists
reactively.Example:
- const prompt = getPrompt(promptName) ?? ''; - const exists = hasPrompt(promptName); + let prompt = getPrompt(promptName) ?? ''; + $: prompt = getPrompt(promptName) ?? ''; + $: exists = hasPrompt(promptName);Note: If
createCopy
capturesprompt
by value, consider re-creating it whenprompt
changes.
41-50
: Deep link fallback won’t trigger via try/catch.Navigation to custom schemes won’t throw; consider a timed fallback (copy after setTimeout if page not hidden) or show guidance if blocked.
Also verify these URLs accept prefilled prompts:
- Cursor:
cursor://anysphere.cursor-deeplink/prompt?text=...
- ChatGPT:
https://chatgpt.com/?prompt=...
- Claude:
https://claude.ai/new?q=...
Also applies to: 52-63
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (47)
src/lib/components/PromptBanner.svelte
(1 hunks)src/prompts/quickstarts/android-java.md
(1 hunks)src/prompts/quickstarts/android.md
(1 hunks)src/prompts/quickstarts/angular.md
(1 hunks)src/prompts/quickstarts/apple.md
(1 hunks)src/prompts/quickstarts/dart.md
(1 hunks)src/prompts/quickstarts/deno.md
(1 hunks)src/prompts/quickstarts/dotnet.md
(1 hunks)src/prompts/quickstarts/flutter.md
(1 hunks)src/prompts/quickstarts/kotlin.md
(1 hunks)src/prompts/quickstarts/nextjs.md
(1 hunks)src/prompts/quickstarts/node.md
(1 hunks)src/prompts/quickstarts/nuxt.md
(1 hunks)src/prompts/quickstarts/php.md
(1 hunks)src/prompts/quickstarts/python.md
(1 hunks)src/prompts/quickstarts/react-native.md
(1 hunks)src/prompts/quickstarts/react.md
(1 hunks)src/prompts/quickstarts/refine.md
(1 hunks)src/prompts/quickstarts/ruby.md
(1 hunks)src/prompts/quickstarts/solid.md
(1 hunks)src/prompts/quickstarts/sveltekit.md
(1 hunks)src/prompts/quickstarts/swift.md
(1 hunks)src/prompts/quickstarts/vue.md
(1 hunks)src/prompts/quickstarts/web.md
(1 hunks)src/routes/docs/quick-starts/android-java/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/android/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/angular/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/apple/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/dart/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/deno/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/dotnet/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/flutter/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/go/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/kotlin/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/node/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/nuxt/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/php/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/python/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/react-native/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/react/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/refine/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/ruby/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/solid/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/sveltekit/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/swift/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/vue/+page.markdoc
(1 hunks)src/routes/docs/quick-starts/web/+page.markdoc
(1 hunks)
✅ Files skipped from review due to trivial changes (23)
- src/prompts/quickstarts/ruby.md
- src/routes/docs/quick-starts/node/+page.markdoc
- src/routes/docs/quick-starts/php/+page.markdoc
- src/routes/docs/quick-starts/angular/+page.markdoc
- src/routes/docs/quick-starts/go/+page.markdoc
- src/routes/docs/quick-starts/refine/+page.markdoc
- src/routes/docs/quick-starts/python/+page.markdoc
- src/routes/docs/quick-starts/dart/+page.markdoc
- src/routes/docs/quick-starts/solid/+page.markdoc
- src/routes/docs/quick-starts/android/+page.markdoc
- src/routes/docs/quick-starts/android-java/+page.markdoc
- src/routes/docs/quick-starts/react-native/+page.markdoc
- src/routes/docs/quick-starts/deno/+page.markdoc
- src/routes/docs/quick-starts/ruby/+page.markdoc
- src/routes/docs/quick-starts/flutter/+page.markdoc
- src/routes/docs/quick-starts/apple/+page.markdoc
- src/routes/docs/quick-starts/dotnet/+page.markdoc
- src/prompts/quickstarts/kotlin.md
- src/routes/docs/quick-starts/kotlin/+page.markdoc
- src/routes/docs/quick-starts/sveltekit/+page.markdoc
- src/routes/docs/quick-starts/react/+page.markdoc
- src/routes/docs/quick-starts/vue/+page.markdoc
- src/prompts/quickstarts/dart.md
🚧 Files skipped from review as they are similar to previous changes (1)
- src/prompts/quickstarts/nextjs.md
🔇 Additional comments (10)
src/routes/docs/quick-starts/swift/+page.markdoc (1)
8-8
: LGTM! Verify that the prompt file exists.The front-matter addition is syntactically correct and follows the established pattern for integrating prompt banners into quick-start pages.
Run the following script to confirm the referenced prompt file exists:
src/prompts/quickstarts/solid.md (1)
41-57
: Fix Appwrite Account method invocations.The snippet shows the Web SDK calls using object arguments, but the Appwrite browser SDK expects positional parameters. Keep it consistent with the official docs or the generated TS definitions:
account.createEmailPasswordSession(email, password)
account.create(ID.unique(), email, password, name?)
account.deleteSession('current')
As written,
account.createEmailPasswordSession({ ... })
,account.create({ ... })
, andaccount.deleteSession({ ... })
will throw because they don't match the expected signatures. Please update the prompt to use the positional arguments so developers copying this guide won't hit runtime errors.⛔ Skipped due to learnings
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:22-31 Timestamp: 2025-09-25T05:26:19.287Z Learning: Appwrite JavaScript SDKs now support object-based arguments instead of positional arguments as of 2025. The account.create method should be called with an object parameter containing userId, email, password, and optional name, rather than positional arguments. Positional arguments still work but are deprecated.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:22-31 Timestamp: 2025-09-25T05:26:19.287Z Learning: Appwrite JavaScript SDKs now support object-based arguments instead of positional arguments as of 2025. The account.create method should be called with an object parameter containing userId, email, password, and optional name, rather than positional arguments. Positional arguments still work but are deprecated.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: Appwrite v17+ uses object parameters consistently across Account methods. Both account.create({ userId, email, password }) and account.createEmailPasswordSession({ email, password }) use object parameters instead of positional arguments.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: The Appwrite `createEmailPasswordSession` method uses object parameters `{ email, password }` instead of positional arguments. This is consistent with other Account methods in Appwrite that also use object parameters.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: Appwrite v17+ uses object parameters for Account methods including createEmailPasswordSession({ email, password }) instead of positional arguments. This is consistent across the Account API methods like account.create({ userId, email, password }).
src/prompts/quickstarts/vue.md (1)
47-63
: Fix Appwrite Account SDK callsThe JavaScript SDK’s account methods still take positional arguments; passing configuration objects will throw at runtime. Update the snippet to use the supported signatures.
- async function login(e, p) { - await account.createEmailPasswordSession({ email: e, password: p }); + async function login(e, p) { + await account.createEmailPasswordSession(e, p); user.value = await account.get(); } async function register() { - await account.create({ - userId: ID.unique(), - email: email.value, - password: password.value, - name: name.value - }); + await account.create( + ID.unique(), + email.value, + password.value, + name.value + ); await login(email.value, password.value); } async function logout() { - await account.deleteSession({ sessionId: 'current' }); + await account.deleteSession('current'); user.value = null; }⛔ Skipped due to learnings
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:22-31 Timestamp: 2025-09-25T05:26:19.287Z Learning: Appwrite JavaScript SDKs now support object-based arguments instead of positional arguments as of 2025. The account.create method should be called with an object parameter containing userId, email, password, and optional name, rather than positional arguments. Positional arguments still work but are deprecated.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:22-31 Timestamp: 2025-09-25T05:26:19.287Z Learning: Appwrite JavaScript SDKs now support object-based arguments instead of positional arguments as of 2025. The account.create method should be called with an object parameter containing userId, email, password, and optional name, rather than positional arguments. Positional arguments still work but are deprecated.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: Appwrite v17+ uses object parameters consistently across Account methods. Both account.create({ userId, email, password }) and account.createEmailPasswordSession({ email, password }) use object parameters instead of positional arguments.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: Appwrite v17+ uses object parameters for Account methods including createEmailPasswordSession({ email, password }) instead of positional arguments. This is consistent across the Account API methods like account.create({ userId, email, password }).
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: The Appwrite `createEmailPasswordSession` method uses object parameters `{ email, password }` instead of positional arguments. This is consistent with other Account methods in Appwrite that also use object parameters.
src/prompts/quickstarts/react.md (1)
47-58
: Fix Appwrite Account API usage in the snippet.
account.createEmailPasswordSession
,account.create
, andaccount.deleteSession
all take positional parameters (email/password, userId/email/password/name, sessionId). Passing a single object will throw at runtime, so the prompt would guide users into a broken implementation. Update the snippet to use positional arguments:- await account.createEmailPasswordSession({ email, password }); + await account.createEmailPasswordSession(email, password); … - await account.create({ userId: ID.unique(), email, password, name }); + await account.create(ID.unique(), email, password, name); … - await account.deleteSession({ sessionId: 'current' }); + await account.deleteSession('current');⛔ Skipped due to learnings
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:22-31 Timestamp: 2025-09-25T05:26:19.287Z Learning: Appwrite JavaScript SDKs now support object-based arguments instead of positional arguments as of 2025. The account.create method should be called with an object parameter containing userId, email, password, and optional name, rather than positional arguments. Positional arguments still work but are deprecated.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:22-31 Timestamp: 2025-09-25T05:26:19.287Z Learning: Appwrite JavaScript SDKs now support object-based arguments instead of positional arguments as of 2025. The account.create method should be called with an object parameter containing userId, email, password, and optional name, rather than positional arguments. Positional arguments still work but are deprecated.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: The Appwrite `createEmailPasswordSession` method uses object parameters `{ email, password }` instead of positional arguments. This is consistent with other Account methods in Appwrite that also use object parameters.
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: Appwrite v17+ uses object parameters for Account methods including createEmailPasswordSession({ email, password }) instead of positional arguments. This is consistent across the Account API methods like account.create({ userId, email, password }).
Learnt from: BretRen PR: appwrite/website#2442 File: src/routes/docs/products/auth/email-password/+page.markdoc:50-56 Timestamp: 2025-09-25T05:24:12.551Z Learning: Appwrite v17+ uses object parameters consistently across Account methods. Both account.create({ userId, email, password }) and account.createEmailPasswordSession({ email, password }) use object parameters instead of positional arguments.
src/prompts/quickstarts/android.md (1)
33-33
: Region-scoped endpoint is correct.Appwrite Cloud recommends using
https://<REGION>.cloud.appwrite.io/v1
for the Android SDK.src/prompts/quickstarts/android-java.md (1)
21-23
: ```markdown**Confirm endpoint format.** Please verify whether BuildConfig.APPWRITE_ENDPOINT should use the global base URL (`https://cloud.appwrite.io/v1`) or a region-specific subdomain (e.g. `https://<REGION>.cloud.appwrite.io/v1`) according to the Appwrite Android SDK documentation. </blockquote></details> <details> <summary>src/routes/docs/quick-starts/nuxt/+page.markdoc (1)</summary><blockquote> `8-8`: **Frontmatter prompt path looks right; please verify linkage.** Ensure `src/prompts/quickstarts/nuxt.md` is discoverable by the prompts utility and the banner renders on this page. </blockquote></details> <details> <summary>src/prompts/quickstarts/angular.md (1)</summary><blockquote> `1-63`: **Angular prompt reads well and is actionable.** Clear steps, env usage, and service abstraction. LGTM. </blockquote></details> <details> <summary>src/prompts/quickstarts/web.md (1)</summary><blockquote> `1-63`: **Looks good.** Clear steps for both npm and CDN usage; flows are correct. </blockquote></details> <details> <summary>src/prompts/quickstarts/node.md (1)</summary><blockquote> `11-13`: **Verify SDK version and `TablesDB` API names.** Please confirm: - Latest `node-appwrite` version. - `TablesDB` service and `listRows` signature are correct for that version. Also applies to: 31-33, 39-44 </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
<Button | ||
variant="secondary" | ||
onclick={handleMainClick} | ||
aria-label={$copied ? 'Copied' : 'Copy prompt'} | ||
class="no-right-radius" | ||
> | ||
<Icon name={$copied ? 'check' : 'copy'} aria-hidden="true" /> | ||
<span>{$copied ? 'Copied' : 'Copy prompt'}</span> | ||
</Button> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Svelte events: use on:click
, not onclick
.
Current handlers won’t fire. Replace onclick
with on:click
.
Apply:
- <Button
+ <Button
variant="secondary"
- onclick={handleMainClick}
+ on:click={handleMainClick}
aria-label={$copied ? 'Copied' : 'Copy prompt'}
class="no-right-radius"
>
@@
- <button
+ <button
type="button"
class="menu-btn"
- onclick={() => {
+ on:click={() => {
openIde('cursor');
}}
>
@@
- <button
+ <button
type="button"
class="menu-btn"
- onclick={() => {
+ on:click={() => {
openIde('chatgpt');
}}
>
@@
- <button
+ <button
type="button"
class="menu-btn"
- onclick={() => {
+ on:click={() => {
openIde('claude');
}}
>
Also applies to: 103-110, 129-136, 154-160
🤖 Prompt for AI Agents
In src/lib/components/PromptBanner.svelte around lines 78-87 (and also at
103-110, 129-136, 154-160), the component uses the HTML attribute onclick which
does not wire Svelte event handlers; replace each onclick={...} with Svelte's
on:click={...} so the handlers fire correctly, preserving the same handler
names, props, and aria attributes.
--p-card-border-radius: 0.5rem; | ||
padding: 4px; | ||
backdrop-filter: blur(2px); | ||
--webkit-backdrop-filter: blur(2px); | ||
z-index: 100; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vendor prefix typo in CSS.
Use -webkit-backdrop-filter
, not --webkit-backdrop-filter
.
Apply:
- --webkit-backdrop-filter: blur(2px);
+ -webkit-backdrop-filter: blur(2px);
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
--p-card-border-radius: 0.5rem; | |
padding: 4px; | |
backdrop-filter: blur(2px); | |
--webkit-backdrop-filter: blur(2px); | |
z-index: 100; | |
} | |
--p-card-border-radius: 0.5rem; | |
padding: 4px; | |
backdrop-filter: blur(2px); | |
-webkit-backdrop-filter: blur(2px); | |
z-index: 100; | |
} |
🤖 Prompt for AI Agents
In src/lib/components/PromptBanner.svelte around lines 218 to 223, the CSS
vendor-prefixed property is mistyped as "--webkit-backdrop-filter"; replace it
with the correct "-webkit-backdrop-filter" property (single hyphen) so the
backdrop-filter works in WebKit-based browsers, leaving the rest of the block
unchanged.
Goal: Use Appwrite from an Android app written in Java to sign up/login/logout (no full UI replacements). | ||
|
||
Rules | ||
|
||
- Ask the user for Cloud Region and Project ID; do not hardcode silently. | ||
- Configure endpoint/project via safe config (BuildConfig fields or strings.xml). No secrets in client. | ||
- Add OAuth callback for future social auth. | ||
|
||
1. Install SDK | ||
- In app-level `build.gradle` inside `dependencies` add: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include “Add Android platform” step in Appwrite Console.
Add a step to register the Android platform (package name, etc.) in Console → Projects → Platforms to enable client auth/OAuth.
🤖 Prompt for AI Agents
In src/prompts/quickstarts/android-java.md around lines 1 to 10, the quickstart
omits instructing users to register the Android platform in the Appwrite
Console; add a concise step telling the user to open Console → Projects →
Platforms and add the Android platform (package name, SHA-1/SHA-256 if required)
so client authentication and OAuth will work. Mention this step before SDK
installation and configuration, and note that it is required to enable client
auth/OAuth callbacks.
1. Install SDK | ||
- In app-level `build.gradle` inside `dependencies` add: | ||
```groovy | ||
implementation "io.appwrite:sdk-for-android:8.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify SDK version pin (avoid stale deps).
Ensure 8.1.0 is the recommended stable for your setup.
🌐 Web query:
What is the latest stable version of the Appwrite Android SDK, and does it recommend a specific major for Cloud users?
💡 Result:
Latest stable Android SDK: 11.2.1. [1]
Recommendation for Cloud users: pin/revert to the previous major (use one major version behind the latest SDK to match Appwrite Cloud), and pin SDK versions. [2][3]
Sources:
- GitHub SDK README (installation shows 11.2.1). [1]
- Appwrite Threads / community guidance: advise Cloud users to revert one major version and pin SDKs. [2][3]
Pin Android SDK to Cloud-compatible major version
Replace 8.1.0
(line 12) with a version one major behind the latest stable (11.2.1)—e.g., io.appwrite:sdk-for-android:10.x.y
—and pin exact versions to avoid stale dependencies.
🤖 Prompt for AI Agents
In src/prompts/quickstarts/android-java.md around line 12, the Android SDK
dependency is pinned to an old major version "8.1.0"; update this to a
Cloud-compatible major that is one behind the latest stable (major 10) and pin
an exact patch version (for example use io.appwrite:sdk-for-android:10.2.1) so
the dependency is explicit and not stale; change the version string on that line
accordingly and re-sync/build to verify.
<activity android:name="io.appwrite.views.CallbackActivity" android:exported="true"> | ||
<intent-filter android:label="android_web_auth"> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
<data android:scheme="appwrite-callback-<PROJECT_ID>" /> | ||
</intent-filter> | ||
</activity> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add INTERNET permission (required).
Manifest lacks INTERNET permission; network calls will fail.
Add at manifest top level:
<uses-permission android:name="android.permission.INTERNET" />
🤖 Prompt for AI Agents
In src/prompts/quickstarts/android-java.md around lines 31 to 39 the
AndroidManifest snippet is missing the required INTERNET permission which will
cause network calls to fail; update the manifest example by adding the
<uses-permission android:name="android.permission.INTERNET" /> element at the
top-level of the manifest (as a sibling of the <application> element and inside
the <manifest> root) so the sample manifest includes network permission.
from appwrite.client import Client | ||
from appwrite.services.tablesDB import TablesDB | ||
from appwrite.id import ID | ||
import os | ||
client = Client() | ||
client.set_endpoint(os.getenv('APPWRITE_ENDPOINT')) | ||
client.set_project(os.getenv('APPWRITE_PROJECT_ID')) | ||
client.set_key(os.getenv('APPWRITE_API_KEY')) | ||
tablesDB = TablesDB(client) | ||
``` | ||
|
||
5. Example ops (idea + key snippets) | ||
- Create database/table/columns; seed rows; list rows using `Query`. | ||
- Key list pattern: | ||
```py | ||
from appwrite.query import Query | ||
def list_rows(database_id, table_id): | ||
res = tablesDB.list_rows(database_id=database_id, table_id=table_id) | ||
print(res['rows']) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align with the actual Python SDK surface.
appwrite.services.tablesDB
/ TablesDB
and list_rows()
don’t exist. The Python SDK ships appwrite.services.databases.Databases
with methods like list_documents()
/create_document()
. Update the imports, service instantiation, and examples so the quickstart runs.
-from appwrite.services.tablesDB import TablesDB
+from appwrite.services.databases import Databases
...
-tablesDB = TablesDB(client)
+databases = Databases(client)
...
-res = tablesDB.list_rows(database_id=database_id, table_id=table_id)
-print(res['rows'])
+res = databases.list_documents(database_id=database_id, collection_id=table_id)
+print(res['documents'])
Also update the narrative (variable names, method references) to match the corrected API.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
from appwrite.client import Client | |
from appwrite.services.tablesDB import TablesDB | |
from appwrite.id import ID | |
import os | |
client = Client() | |
client.set_endpoint(os.getenv('APPWRITE_ENDPOINT')) | |
client.set_project(os.getenv('APPWRITE_PROJECT_ID')) | |
client.set_key(os.getenv('APPWRITE_API_KEY')) | |
tablesDB = TablesDB(client) | |
``` | |
5. Example ops (idea + key snippets) | |
- Create database/table/columns; seed rows; list rows using `Query`. | |
- Key list pattern: | |
```py | |
from appwrite.query import Query | |
def list_rows(database_id, table_id): | |
res = tablesDB.list_rows(database_id=database_id, table_id=table_id) | |
print(res['rows']) | |
``` | |
# src/prompts/quickstarts/python.md (imports & client setup) | |
from appwrite.client import Client | |
from appwrite.services.databases import Databases | |
from appwrite.id import ID | |
import os | |
client = Client() | |
client.set_endpoint(os.getenv('APPWRITE_ENDPOINT')) | |
client.set_project(os.getenv('APPWRITE_PROJECT_ID')) | |
client.set_key(os.getenv('APPWRITE_API_KEY')) | |
databases = Databases(client) |
from appwrite.client import Client | |
from appwrite.services.tablesDB import TablesDB | |
from appwrite.id import ID | |
import os | |
client = Client() | |
client.set_endpoint(os.getenv('APPWRITE_ENDPOINT')) | |
client.set_project(os.getenv('APPWRITE_PROJECT_ID')) | |
client.set_key(os.getenv('APPWRITE_API_KEY')) | |
tablesDB = TablesDB(client) | |
``` | |
5. Example ops (idea + key snippets) | |
- Create database/table/columns; seed rows; list rows using `Query`. | |
- Key list pattern: | |
```py | |
from appwrite.query import Query | |
def list_rows(database_id, table_id): | |
res = tablesDB.list_rows(database_id=database_id, table_id=table_id) | |
print(res['rows']) | |
``` | |
# src/prompts/quickstarts/python.md (list_rows example) | |
from appwrite.query import Query | |
def list_rows(database_id, table_id): | |
res = databases.list_documents(database_id=database_id, collection_id=table_id) | |
print(res['documents']) |
🤖 Prompt for AI Agents
In src/prompts/quickstarts/python.md around lines 24 to 43, the snippet and
narrative use non-existent appwrite.services.tablesDB.TablesDB and list_rows();
replace them to match the Python SDK surface: import Databases from
appwrite.services.databases, instantiate Databases(client) (use a variable name
like databases or dbs), and update example operations to use
list_documents/create_document (and any other correct method names) and adjust
variable/method names and explanatory text to reflect Databases and documents
instead of Tables/rows so the quickstart runs against the real SDK API.
import React, { useState } from 'react'; | ||
import { View, Text, TextInput, TouchableOpacity } from 'react-native'; | ||
import { account, ID } from '../lib/appwrite'; | ||
const [user, setUser] = useState(null); | ||
const [email, setEmail] = useState(''); | ||
const [password, setPassword] = useState(''); | ||
const [name, setName] = useState(''); | ||
async function login(e: string, p: string) { | ||
await account.createEmailPasswordSession({ email: e, password: p }); | ||
setUser(await account.get()); | ||
} | ||
async function register() { | ||
await account.create({ userId: ID.unique(), email, password, name }); | ||
await login(email, password); | ||
} | ||
async function logout() { | ||
await account.deleteSession({ sessionId: 'current' }); | ||
setUser(null); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the hook-driven state and handlers inside a component.
This snippet calls useState
(and the handlers relying on it) at module scope. React hooks must be invoked inside a function component; doing so at the top level throws “Invalid hook call” and prevents the example from running. Please wrap the state and helper functions inside a component, e.g. export default function AuthScreen() { ... }
, before returning the JSX.
-import React, { useState } from 'react';
-import { View, Text, TextInput, TouchableOpacity } from 'react-native';
-import { account, ID } from '../lib/appwrite';
-
-const [user, setUser] = useState(null);
-const [email, setEmail] = useState('');
-const [password, setPassword] = useState('');
-const [name, setName] = useState('');
-
-async function login(e: string, p: string) {
- await account.createEmailPasswordSession({ email: e, password: p });
- setUser(await account.get());
-}
-async function register() {
- await account.create({ userId: ID.unique(), email, password, name });
- await login(email, password);
-}
-async function logout() {
- await account.deleteSession({ sessionId: 'current' });
- setUser(null);
-}
+import React, { useState } from 'react';
+import { View, Text, TextInput, TouchableOpacity } from 'react-native';
+import { account, ID } from '../lib/appwrite';
+
+export default function AuthScreen() {
+ const [user, setUser] = useState(null);
+ const [email, setEmail] = useState('');
+ const [password, setPassword] = useState('');
+ const [name, setName] = useState('');
+
+ async function login(e: string, p: string) {
+ await account.createEmailPasswordSession({ email: e, password: p });
+ setUser(await account.get());
+ }
+
+ async function register() {
+ await account.create({ userId: ID.unique(), email, password, name });
+ await login(email, password);
+ }
+
+ async function logout() {
+ await account.deleteSession({ sessionId: 'current' });
+ setUser(null);
+ }
+
+ return (
+ // JSX snippet here…
+ );
+}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import React, { useState } from 'react'; | |
import { View, Text, TextInput, TouchableOpacity } from 'react-native'; | |
import { account, ID } from '../lib/appwrite'; | |
const [user, setUser] = useState(null); | |
const [email, setEmail] = useState(''); | |
const [password, setPassword] = useState(''); | |
const [name, setName] = useState(''); | |
async function login(e: string, p: string) { | |
await account.createEmailPasswordSession({ email: e, password: p }); | |
setUser(await account.get()); | |
} | |
async function register() { | |
await account.create({ userId: ID.unique(), email, password, name }); | |
await login(email, password); | |
} | |
async function logout() { | |
await account.deleteSession({ sessionId: 'current' }); | |
setUser(null); | |
} | |
import React, { useState } from 'react'; | |
import { View, Text, TextInput, TouchableOpacity } from 'react-native'; | |
import { account, ID } from '../lib/appwrite'; | |
export default function AuthScreen() { | |
const [user, setUser] = useState(null); | |
const [email, setEmail] = useState(''); | |
const [password, setPassword] = useState(''); | |
const [name, setName] = useState(''); | |
async function login(e: string, p: string) { | |
await account.createEmailPasswordSession({ email: e, password: p }); | |
setUser(await account.get()); | |
} | |
async function register() { | |
await account.create({ userId: ID.unique(), email, password, name }); | |
await login(email, password); | |
} | |
async function logout() { | |
await account.deleteSession({ sessionId: 'current' }); | |
setUser(null); | |
} | |
return ( | |
// JSX snippet here… | |
); | |
} |
🤖 Prompt for AI Agents
In src/prompts/quickstarts/react-native.md around lines 39 to 59, the useState
hooks and the login/register/logout handlers are declared at module scope which
violates React rules of hooks; move all hook-driven state (useState calls) and
the async handler functions inside a function component (for example: export
default function AuthScreen() { ... }) so hooks run during render, then return
the JSX from that component and export it; ensure any imports remain at
top-level and update references to the state/handlers to use the component-local
variables.
import { Appwrite, Account, Storage } from '@refinedev/appwrite'; | ||
const endpoint = import.meta.env.VITE_APPWRITE_ENDPOINT; | ||
const projectId = import.meta.env.VITE_APPWRITE_PROJECT_ID; | ||
if (!endpoint || !projectId) throw new Error('Missing VITE_APPWRITE_*'); | ||
|
||
const appwriteClient = new Appwrite().setEndpoint(endpoint).setProject(projectId); | ||
const account = new Account(appwriteClient); | ||
const storage = new Storage(appwriteClient); | ||
export { appwriteClient, account, storage }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix Appwrite client import and construction
@refinedev/appwrite
does not export an Appwrite
class, so import { Appwrite, Account, Storage } from '@refinedev/appwrite'
and new Appwrite()
will throw at build time. Import the client and services from the official appwrite
SDK instead:
- import { Appwrite, Account, Storage } from '@refinedev/appwrite';
- const appwriteClient = new Appwrite().setEndpoint(endpoint).setProject(projectId);
+ import { Client, Account, Storage } from 'appwrite';
+ const appwriteClient = new Client().setEndpoint(endpoint).setProject(projectId);
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import { Appwrite, Account, Storage } from '@refinedev/appwrite'; | |
const endpoint = import.meta.env.VITE_APPWRITE_ENDPOINT; | |
const projectId = import.meta.env.VITE_APPWRITE_PROJECT_ID; | |
if (!endpoint || !projectId) throw new Error('Missing VITE_APPWRITE_*'); | |
const appwriteClient = new Appwrite().setEndpoint(endpoint).setProject(projectId); | |
const account = new Account(appwriteClient); | |
const storage = new Storage(appwriteClient); | |
export { appwriteClient, account, storage }; | |
import { Client, Account, Storage } from 'appwrite'; | |
const endpoint = import.meta.env.VITE_APPWRITE_ENDPOINT; | |
const projectId = import.meta.env.VITE_APPWRITE_PROJECT_ID; | |
if (!endpoint || !projectId) throw new Error('Missing VITE_APPWRITE_*'); | |
const appwriteClient = new Client().setEndpoint(endpoint).setProject(projectId); | |
const account = new Account(appwriteClient); | |
const storage = new Storage(appwriteClient); | |
export { appwriteClient, account, storage }; |
🤖 Prompt for AI Agents
In src/prompts/quickstarts/refine.md around lines 28 to 36, the code imports and
constructs a non-existent Appwrite class from '@refinedev/appwrite'; replace
that with the official appwrite SDK: import the Client, Account, and Storage
from 'appwrite', create a new Client() and call
setEndpoint(endpoint).setProject(projectId) on it, then pass that client
instance into new Account(client) and new Storage(client), and remove the
incorrect import from '@refinedev/appwrite' so exports remain appwriteClient,
account, storage.
1. Create SvelteKit project | ||
- Run: npx sv create | ||
- Choose SvelteKit + JavaScript (or TypeScript if user wants TS). | ||
- cd into the created directory. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the SvelteKit scaffolding command.
npx sv create
isn’t a published SvelteKit bootstrap tool, so newcomers will hit “command not found.” The supported flow is npm create svelte@latest <project-name>
(or the matching pnpm/yarn variants). Please replace the command (and mention picking the template when prompted) so the quickstart actually scaffolds a project.
🤖 Prompt for AI Agents
In src/prompts/quickstarts/sveltekit.md around lines 9 to 13, the scaffolding
command "npx sv create" is invalid; replace it with the supported command "npm
create svelte@latest <project-name>" and note the equivalent pnpm/yarn variants
("pnpm create svelte@latest" / "yarn create svelte@latest"), instruct the user
to run that, enter the project name, choose the template and JavaScript or
TypeScript when prompted, then cd into the created directory.
let tablesDB = TablesDB(client) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the correct Appwrite service in Swift
TablesDB
isn’t part of the Appwrite Swift SDK (v10). Attempting to instantiate it will fail to compile. Use the Databases
service provided by the SDK:
- let tablesDB = TablesDB(client)
+ let databases = Databases(client)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
let tablesDB = TablesDB(client) | |
``` | |
let databases = Databases(client) |
🤖 Prompt for AI Agents
In src/prompts/quickstarts/swift.md around lines 32-33, the snippet instantiates
a non-existent TablesDB class; replace it with the Appwrite v10 Databases
service instead and update the example to show using the SDK's Databases type
(and any required import) so the code compiles with the official Swift SDK.
Summary by CodeRabbit
New Features
Documentation