temp
This commit is contained in:
2
convex/_generated/api.d.ts
vendored
2
convex/_generated/api.d.ts
vendored
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
import type * as abcv from "../abcv.js";
|
||||
import type * as xiong from "../xiong.js";
|
||||
|
||||
import type {
|
||||
ApiFromModules,
|
||||
@@ -18,6 +19,7 @@ import type {
|
||||
|
||||
declare const fullApi: ApiFromModules<{
|
||||
abcv: typeof abcv;
|
||||
xiong: typeof xiong;
|
||||
}>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { query, mutation, action } from "./_generated/server";
|
||||
import { Kevisual } from '@kevisual/ai/browser'
|
||||
import { v } from "convex/values";
|
||||
import { } from "convex/server";
|
||||
export const get = query({
|
||||
args: {},
|
||||
handler: async (ctx) => {
|
||||
|
||||
@@ -5,5 +5,8 @@ import { v } from "convex/values";
|
||||
export default defineSchema({
|
||||
abcv: defineTable({
|
||||
title: v.string(),
|
||||
})
|
||||
}),
|
||||
xiong: defineTable({
|
||||
name: v.string(),
|
||||
}),
|
||||
});
|
||||
8
convex/xiong.ts
Normal file
8
convex/xiong.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { query, mutation, action } from "./_generated/server";
|
||||
|
||||
export const get = query({
|
||||
args: {},
|
||||
handler: async (ctx) => {
|
||||
return await ctx.db.query("xiong").collect();
|
||||
},
|
||||
});
|
||||
6
index.ts
6
index.ts
@@ -21,8 +21,10 @@ const unsubscribe = client.onUpdate(api.abcv.get, {}, async (tasks) => {
|
||||
// const a = list[i];
|
||||
// console.log(`Item ${i}:`, a.title);
|
||||
// }
|
||||
const list = await client.action(api.abcv.chat, { message: "Hello, 1+1=?" });
|
||||
console.log("Chat response:", list);
|
||||
// const list = await client.action(api.abcv.chat, { message: "Hello, 1+1=?" });
|
||||
// console.log("Chat response:", list);
|
||||
const xiongList = await client.query(api.xiong.get, {});
|
||||
console.log("Xiong list:", xiongList);
|
||||
await Bun.sleep(1000);
|
||||
unsubscribe();
|
||||
await client.close();
|
||||
Reference in New Issue
Block a user