mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 15:32:11 +08:00
chore: remove unrelated package changes
This commit is contained in:
@@ -105,7 +105,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@opencode-ai/http-recorder": "workspace:*",
|
||||
"@opencode-ai/llm": "workspace:*",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.1",
|
||||
"@parcel/watcher-darwin-x64": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
|
||||
@@ -306,7 +305,7 @@
|
||||
},
|
||||
"packages/kilo-jetbrains": {
|
||||
"name": "@kilocode/kilo-jetbrains",
|
||||
"version": "7.4.11",
|
||||
"version": "7.4.9",
|
||||
},
|
||||
"packages/kilo-memory": {
|
||||
"name": "@kilocode/kilo-memory",
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
"@types/node": "catalog:",
|
||||
"@types/turndown": "5.0.5",
|
||||
"@types/which": "3.0.4",
|
||||
"@opencode-ai/llm": "workspace:*",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.1",
|
||||
"@parcel/watcher-darwin-x64": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DatabaseSync } from "node:sqlite"
|
||||
import { DatabaseSync, type SQLInputValue } from "node:sqlite"
|
||||
import { drizzle } from "drizzle-orm/node-sqlite"
|
||||
import * as Context from "effect/Context"
|
||||
import * as Effect from "effect/Effect"
|
||||
@@ -17,11 +17,6 @@ import { Sqlite } from "./sqlite"
|
||||
|
||||
const ATTR_DB_SYSTEM_NAME = "db.system.name"
|
||||
|
||||
type SqliteValue = null | number | bigint | string | Uint8Array
|
||||
type SqliteStatement = ReturnType<DatabaseSync["prepare"]> & {
|
||||
readonly setReturnArrays: (value: boolean) => void
|
||||
}
|
||||
|
||||
const TypeId = "~@opencode-ai/core/database/SqliteNode" as const
|
||||
type TypeId = typeof TypeId
|
||||
|
||||
@@ -63,7 +58,7 @@ const make = (options: Config) =>
|
||||
const statement = native.prepare(query)
|
||||
statement.setReadBigInts(Context.get(fiber.context, Client.SafeIntegers))
|
||||
try {
|
||||
return Effect.succeed(statement.all(...(params as SqliteValue[])) as Array<Record<string, unknown>>)
|
||||
return Effect.succeed(statement.all(...(params as SQLInputValue[])) as Array<Record<string, unknown>>)
|
||||
} catch (cause) {
|
||||
return Effect.fail(
|
||||
new SqlError({
|
||||
@@ -75,12 +70,12 @@ const make = (options: Config) =>
|
||||
|
||||
const runValues = (query: string, params: ReadonlyArray<unknown> = []) =>
|
||||
Effect.withFiber<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>((fiber) => {
|
||||
const statement = native.prepare(query) as SqliteStatement
|
||||
const statement = native.prepare(query)
|
||||
statement.setReadBigInts(Context.get(fiber.context, Client.SafeIntegers))
|
||||
statement.setReturnArrays(true)
|
||||
try {
|
||||
return Effect.succeed(
|
||||
statement.all(...(params as SqliteValue[])) as unknown as ReadonlyArray<ReadonlyArray<unknown>>,
|
||||
statement.all(...(params as SQLInputValue[])) as unknown as ReadonlyArray<ReadonlyArray<unknown>>,
|
||||
)
|
||||
} catch (cause) {
|
||||
return Effect.fail(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export * as NodeSqliteClient from "./index"
|
||||
|
||||
import { DatabaseSync } from "node:sqlite"
|
||||
import { DatabaseSync, type SQLInputValue } from "node:sqlite"
|
||||
import { identity } from "effect/Function"
|
||||
import * as Context from "effect/Context"
|
||||
import * as Effect from "effect/Effect"
|
||||
@@ -17,12 +17,6 @@ import * as Statement from "effect/unstable/sql/Statement"
|
||||
|
||||
const ATTR_DB_SYSTEM_NAME = "db.system.name"
|
||||
|
||||
type SqliteValue = null | number | bigint | string | Uint8Array
|
||||
type SqliteOptions = NonNullable<ConstructorParameters<typeof DatabaseSync>[1]> & { readonly timeout?: number }
|
||||
type SqliteStatement = ReturnType<DatabaseSync["prepare"]> & {
|
||||
readonly setReturnArrays: (value: boolean) => void
|
||||
}
|
||||
|
||||
export const TypeId: TypeId = "~@opencode-ai/effect-sqlite-node/NodeSqliteClient"
|
||||
export type TypeId = "~@opencode-ai/effect-sqlite-node/NodeSqliteClient"
|
||||
|
||||
@@ -62,14 +56,13 @@ export const make = (
|
||||
: undefined
|
||||
|
||||
const makeConnection = Effect.gen(function* () {
|
||||
const opts: SqliteOptions = {
|
||||
const db = new DatabaseSync(options.filename, {
|
||||
readOnly: options.readonly,
|
||||
timeout: options.timeout,
|
||||
allowExtension: options.allowExtension,
|
||||
enableForeignKeyConstraints: true,
|
||||
open: true,
|
||||
}
|
||||
const db = new DatabaseSync(options.filename, opts)
|
||||
})
|
||||
yield* Effect.addFinalizer(() => Effect.sync(() => db.close()))
|
||||
|
||||
if (options.disableWAL !== true && options.readonly !== true) {
|
||||
@@ -81,7 +74,7 @@ export const make = (
|
||||
const statement = db.prepare(sql)
|
||||
statement.setReadBigInts(Context.get(fiber.context, Client.SafeIntegers))
|
||||
try {
|
||||
return Effect.succeed(statement.all(...(params as SqliteValue[])) as Array<Record<string, unknown>>)
|
||||
return Effect.succeed(statement.all(...(params as SQLInputValue[])) as Array<Record<string, unknown>>)
|
||||
} catch (cause) {
|
||||
return Effect.fail(
|
||||
new SqlError({
|
||||
@@ -93,12 +86,12 @@ export const make = (
|
||||
|
||||
const runValues = (sql: string, params: ReadonlyArray<unknown> = []) =>
|
||||
Effect.withFiber<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>((fiber) => {
|
||||
const statement = db.prepare(sql) as SqliteStatement
|
||||
const statement = db.prepare(sql)
|
||||
statement.setReadBigInts(Context.get(fiber.context, Client.SafeIntegers))
|
||||
statement.setReturnArrays(true)
|
||||
try {
|
||||
return Effect.succeed(
|
||||
statement.all(...(params as SqliteValue[])) as unknown as ReadonlyArray<ReadonlyArray<unknown>>,
|
||||
statement.all(...(params as SQLInputValue[])) as unknown as ReadonlyArray<ReadonlyArray<unknown>>,
|
||||
)
|
||||
} catch (cause) {
|
||||
return Effect.fail(
|
||||
|
||||
Reference in New Issue
Block a user