Skip to content

Commit 6eef1c0

Browse files
committed
feat: update SDK to pkg.vc preview with vectorsdb DatabaseType enum
1 parent 3482580 commit 6eef1c0

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"dependencies": {
2222
"@ai-sdk/svelte": "^1.1.24",
23-
"@appwrite.io/console": "github:appwrite/sdk-for-console#6b7d06d",
23+
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@f16c734",
2424
"@appwrite.io/pink-icons": "0.25.0",
2525
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
2626
"@appwrite.io/pink-legacy": "^1.0.3",

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/(components)/editor/view.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
204204
if (filteredEntries.length === 0) return '{}';
205205
206-
// Sort entries: $id first, user fields in middle, timestamps last
206+
// Sort entries: $id first, metadata before embeddings, timestamps last
207207
const sortedEntries = filteredEntries.sort(([keyA], [keyB]) => {
208208
// $id always comes first
209209
if (keyA === '$id') return -1;
@@ -216,6 +216,10 @@
216216
if (isKeyATimestamp && !isKeyBTimestamp) return 1;
217217
if (!isKeyATimestamp && isKeyBTimestamp) return -1;
218218
219+
// metadata before embeddings
220+
if (keyA === 'metadata' && keyB === 'embeddings') return -1;
221+
if (keyA === 'embeddings' && keyB === 'metadata') return 1;
222+
219223
return 0;
220224
});
221225

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/+layout.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@
249249
databaseId: page.params.database,
250250
tableId: page.params.collection,
251251
context: $entityColumnSuggestions.context ?? undefined,
252-
min: 6
252+
min: 6,
253+
databaseType: data.database.type
253254
})) as unknown as {
254255
total: number;
255256
columns: ColumnInput[];

0 commit comments

Comments
 (0)