style: use @sumimakito integrated perfectionist/sort-imports`
Co-authored-by: Makito <5277268+sumimakito@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { createPinia } from 'pinia'
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import App from './App.vue'
|
||||
|
||||
import '@unocss/reset/tailwind.css'
|
||||
import 'uno.css'
|
||||
import './styles/main.css'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
@@ -3,6 +3,7 @@ import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import { routes } from 'vue-router/auto-routes'
|
||||
|
||||
import App from './App.vue'
|
||||
|
||||
import '@unocss/reset/tailwind.css'
|
||||
import 'uno.css'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { AssistantMessage, Message } from '@xsai/shared-chat'
|
||||
|
||||
import type {
|
||||
ElevenLabsWebSocketEventAudioOutput,
|
||||
ElevenLabsWebSocketEventCloseConnection,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import Unocss from 'unocss/vite'
|
||||
import VueRouter from 'unplugin-vue-router/vite'
|
||||
|
||||
@@ -9,6 +9,7 @@ import { routes } from 'vue-router/auto-routes'
|
||||
|
||||
import App from './App.vue'
|
||||
import { i18n } from './modules/i18n'
|
||||
|
||||
import '@unocss/reset/tailwind.css'
|
||||
import 'uno.css'
|
||||
import './styles/main.css'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { join, resolve } from 'node:path'
|
||||
|
||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { Download } from '@proj-airi/unplugin-fetch'
|
||||
import { DownloadLive2DSDK } from '@proj-airi/unplugin-live2d-sdk'
|
||||
|
||||
@@ -12,6 +12,7 @@ import { routes } from 'vue-router/auto-routes'
|
||||
|
||||
import App from './App.vue'
|
||||
import { i18n } from './modules/i18n'
|
||||
|
||||
import '@unocss/reset/tailwind.css'
|
||||
import './styles/main.css'
|
||||
import 'uno.css'
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Buffer } from 'node:buffer'
|
||||
import { cp, mkdir, writeFile } from 'node:fs/promises'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { env } from 'node:process'
|
||||
|
||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { Download } from '@proj-airi/unplugin-fetch/vite'
|
||||
import { DownloadLive2DSDK } from '@proj-airi/unplugin-live2d-sdk/vite'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { readFile, writeFile } from 'node:fs/promises'
|
||||
import { join } from 'node:path'
|
||||
import { cwd } from 'node:process'
|
||||
|
||||
import { defineConfig } from 'bumpp'
|
||||
import { execa } from 'execa'
|
||||
import { parse, stringify } from 'smol-toml'
|
||||
|
||||
+15
-11
@@ -1,5 +1,4 @@
|
||||
import antfu from '@antfu/eslint-config'
|
||||
import { importX } from 'eslint-plugin-import-x'
|
||||
|
||||
export default await antfu(
|
||||
{
|
||||
@@ -15,23 +14,28 @@ export default await antfu(
|
||||
'**/.astro/**',
|
||||
],
|
||||
rules: {
|
||||
'ts/ban-ts-comment': 'off',
|
||||
'import/order': 'off',
|
||||
'antfu/import-dedupe': 'error',
|
||||
'style/padding-line-between-statements': 'error',
|
||||
'import-x/order': [
|
||||
'perfectionist/sort-imports': [
|
||||
'error',
|
||||
{
|
||||
'groups': [
|
||||
['type'],
|
||||
['builtin', 'external'],
|
||||
['parent', 'sibling', 'index'],
|
||||
groups: [
|
||||
'type-builtin',
|
||||
'type-import',
|
||||
'type-internal',
|
||||
['type-parent', 'type-sibling', 'type-index'],
|
||||
'value-builtin',
|
||||
'value-external',
|
||||
'value-internal',
|
||||
['value-parent', 'value-sibling', 'value-index'],
|
||||
['wildcard-value-parent', 'wildcard-value-sibling', 'wildcard-value-index'],
|
||||
'side-effect',
|
||||
'style',
|
||||
],
|
||||
'newlines-between': 'always',
|
||||
newlinesBetween: 'always',
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: {
|
||||
'import-x': importX,
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
"@vitest/coverage-v8": "^3.2.3",
|
||||
"bumpp": "^10.1.1",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-import-x": "^4.15.2",
|
||||
"execa": "^9.6.0",
|
||||
"lint-staged": "^16.1.0",
|
||||
"rollup": "^4.43.0",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import process from 'node:process'
|
||||
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel } from '@guiiai/logg'
|
||||
import { Client } from '@proj-airi/server-sdk'
|
||||
import { runUntilSignal } from '@proj-airi/server-sdk/utils/node'
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
|
||||
import type { AuthenticatedPeer, Peer } from './types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel, useLogg } from '@guiiai/logg'
|
||||
import { createApp, createRouter, defineWebSocketHandler } from 'h3'
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { useSettings } from '../../stores'
|
||||
import Live2DCanvas from '../Live2D/Canvas.vue'
|
||||
import Live2DModel from '../Live2D/Model.vue'
|
||||
import Screen from '../Screen.vue'
|
||||
|
||||
import '../../utils/live2d-zip-loader'
|
||||
|
||||
withDefaults(defineProps<{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { DuckDBWasmDrizzleDatabase } from '@proj-airi/drizzle-duckdb-wasm'
|
||||
import type { SpeechProviderWithExtraOptions } from '@xsai-ext/shared-providers'
|
||||
import type { UnElevenLabsOptions } from 'unspeech'
|
||||
|
||||
import type { Emotion } from '../../constants/emotions'
|
||||
|
||||
import { drizzle } from '@proj-airi/drizzle-duckdb-wasm'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { ChatProvider } from '@xsai-ext/shared-providers'
|
||||
import type { Message, SystemMessage } from '@xsai/shared-chat'
|
||||
|
||||
import type { ChatAssistantMessage, ChatMessage, ChatSlices } from '../types/chat'
|
||||
|
||||
import { defineStore, storeToRefs } from 'pinia'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { SpeechProviderWithExtraOptions } from '@xsai-ext/shared-providers'
|
||||
|
||||
import type { VoiceInfo } from '../providers'
|
||||
|
||||
import { useLocalStorage } from '@vueuse/core'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { join } from 'node:path'
|
||||
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import Unocss from 'unocss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { defineConfig } from 'tsdown'
|
||||
import Raw from 'unplugin-raw/rolldown'
|
||||
import Vue from 'unplugin-vue/rolldown'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import Unocss from 'unocss/vite'
|
||||
import VueRouter from 'unplugin-vue-router/vite'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { defineConfig } from 'tsdown'
|
||||
import Raw from 'unplugin-raw/rolldown'
|
||||
import Vue from 'unplugin-vue/rolldown'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import Unocss from 'unocss/vite'
|
||||
import VueRouter from 'unplugin-vue-router/vite'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { defineConfig } from 'tsdown'
|
||||
import Raw from 'unplugin-raw/rolldown'
|
||||
import Vue from 'unplugin-vue/rolldown'
|
||||
|
||||
Generated
+4
-270
@@ -46,7 +46,7 @@ catalogs:
|
||||
specifier: 0.3.0-beta.4
|
||||
version: 0.3.0-beta.4
|
||||
'@xsai/utils-chat':
|
||||
specifier: ^0.3.0-beta.4
|
||||
specifier: 0.3.0-beta.4
|
||||
version: 0.3.0-beta.4
|
||||
xsschema:
|
||||
specifier: ^0.3.0-beta.4
|
||||
@@ -99,9 +99,6 @@ importers:
|
||||
eslint:
|
||||
specifier: ^9.28.0
|
||||
version: 9.28.0(jiti@2.4.2)
|
||||
eslint-plugin-import-x:
|
||||
specifier: ^4.15.2
|
||||
version: 4.15.2(@typescript-eslint/utils@8.33.1(eslint@9.28.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint@9.28.0(jiti@2.4.2))
|
||||
execa:
|
||||
specifier: ^9.6.0
|
||||
version: 9.6.0
|
||||
@@ -1387,6 +1384,9 @@ importers:
|
||||
'@xsai/tool':
|
||||
specifier: 'catalog:'
|
||||
version: 0.3.0-beta.4(zod-to-json-schema@3.24.5(zod@3.25.64))(zod@3.25.64)
|
||||
'@xsai/utils-chat':
|
||||
specifier: 'catalog:'
|
||||
version: 0.3.0-beta.4
|
||||
best-effort-json-parser:
|
||||
specifier: ^1.1.3
|
||||
version: 1.1.3
|
||||
@@ -5089,101 +5089,6 @@ packages:
|
||||
peerDependencies:
|
||||
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0
|
||||
|
||||
'@unrs/resolver-binding-android-arm-eabi@1.9.0':
|
||||
resolution: {integrity: sha512-h1T2c2Di49ekF2TE8ZCoJkb+jwETKUIPDJ/nO3tJBKlLFPu+fyd93f0rGP/BvArKx2k2HlRM4kqkNarj3dvZlg==}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
|
||||
'@unrs/resolver-binding-android-arm64@1.9.0':
|
||||
resolution: {integrity: sha512-sG1NHtgXtX8owEkJ11yn34vt0Xqzi3k9TJ8zppDmyG8GZV4kVWw44FHwKwHeEFl07uKPeC4ZoyuQaGh5ruJYPA==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@unrs/resolver-binding-darwin-arm64@1.9.0':
|
||||
resolution: {integrity: sha512-nJ9z47kfFnCxN1z/oYZS7HSNsFh43y2asePzTEZpEvK7kGyuShSl3RRXnm/1QaqFL+iP+BjMwuB+DYUymOkA5A==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@unrs/resolver-binding-darwin-x64@1.9.0':
|
||||
resolution: {integrity: sha512-TK+UA1TTa0qS53rjWn7cVlEKVGz2B6JYe0C++TdQjvWYIyx83ruwh0wd4LRxYBM5HeuAzXcylA9BH2trARXJTw==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@unrs/resolver-binding-freebsd-x64@1.9.0':
|
||||
resolution: {integrity: sha512-6uZwzMRFcD7CcCd0vz3Hp+9qIL2jseE/bx3ZjaLwn8t714nYGwiE84WpaMCYjU+IQET8Vu/+BNAGtYD7BG/0yA==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@unrs/resolver-binding-linux-arm-gnueabihf@1.9.0':
|
||||
resolution: {integrity: sha512-bPUBksQfrgcfv2+mm+AZinaKq8LCFvt5PThYqRotqSuuZK1TVKkhbVMS/jvSRfYl7jr3AoZLYbDkItxgqMKRkg==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-arm-musleabihf@1.9.0':
|
||||
resolution: {integrity: sha512-uT6E7UBIrTdCsFQ+y0tQd3g5oudmrS/hds5pbU3h4s2t/1vsGWbbSKhBSCD9mcqaqkBwoqlECpUrRJCmldl8PA==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-arm64-gnu@1.9.0':
|
||||
resolution: {integrity: sha512-vdqBh911wc5awE2bX2zx3eflbyv8U9xbE/jVKAm425eRoOVv/VseGZsqi3A3SykckSpF4wSROkbQPvbQFn8EsA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-arm64-musl@1.9.0':
|
||||
resolution: {integrity: sha512-/8JFZ/SnuDr1lLEVsxsuVwrsGquTvT51RZGvyDB/dOK3oYK2UqeXzgeyq6Otp8FZXQcEYqJwxb9v+gtdXn03eQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-ppc64-gnu@1.9.0':
|
||||
resolution: {integrity: sha512-FkJjybtrl+rajTw4loI3L6YqSOpeZfDls4SstL/5lsP2bka9TiHUjgMBjygeZEis1oC8LfJTS8FSgpKPaQx2tQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-riscv64-gnu@1.9.0':
|
||||
resolution: {integrity: sha512-w/NZfHNeDusbqSZ8r/hp8iL4S39h4+vQMc9/vvzuIKMWKppyUGKm3IST0Qv0aOZ1rzIbl9SrDeIqK86ZpUK37w==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-riscv64-musl@1.9.0':
|
||||
resolution: {integrity: sha512-bEPBosut8/8KQbUixPry8zg/fOzVOWyvwzOfz0C0Rw6dp+wIBseyiHKjkcSyZKv/98edrbMknBaMNJfA/UEdqw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-s390x-gnu@1.9.0':
|
||||
resolution: {integrity: sha512-LDtMT7moE3gK753gG4pc31AAqGUC86j3AplaFusc717EUGF9ZFJ356sdQzzZzkBk1XzMdxFyZ4f/i35NKM/lFA==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-x64-gnu@1.9.0':
|
||||
resolution: {integrity: sha512-WmFd5KINHIXj8o1mPaT8QRjA9HgSXhN1gl9Da4IZihARihEnOylu4co7i/yeaIpcfsI6sYs33cNZKyHYDh0lrA==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-linux-x64-musl@1.9.0':
|
||||
resolution: {integrity: sha512-CYuXbANW+WgzVRIl8/QvZmDaZxrqvOldOwlbUjIM4pQ46FJ0W5cinJ/Ghwa/Ng1ZPMJMk1VFdsD/XwmCGIXBWg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@unrs/resolver-binding-wasm32-wasi@1.9.0':
|
||||
resolution: {integrity: sha512-6Rp2WH0OoitMYR57Z6VE8Y6corX8C6QEMWLgOV6qXiJIeZ1F9WGXY/yQ8yDC4iTraotyLOeJ2Asea0urWj2fKQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [wasm32]
|
||||
|
||||
'@unrs/resolver-binding-win32-arm64-msvc@1.9.0':
|
||||
resolution: {integrity: sha512-rknkrTRuvujprrbPmGeHi8wYWxmNVlBoNW8+4XF2hXUnASOjmuC9FNF1tGbDiRQWn264q9U/oGtixyO3BT8adQ==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@unrs/resolver-binding-win32-ia32-msvc@1.9.0':
|
||||
resolution: {integrity: sha512-Ceymm+iBl+bgAICtgiHyMLz6hjxmLJKqBim8tDzpX61wpZOx2bPK6Gjuor7I2RiUynVjvvkoRIkrPyMwzBzF3A==}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@unrs/resolver-binding-win32-x64-msvc@1.9.0':
|
||||
resolution: {integrity: sha512-k59o9ZyeyS0hAlcaKFezYSH2agQeRFEB7KoQLXl3Nb3rgkqT1NY9Vwy+SqODiLmYnEjxWJVRE/yq2jFVqdIxZw==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@unrteljs/eval@0.2.1':
|
||||
resolution: {integrity: sha512-5gXEoM77HnLBip4bOIcGzpK1Bs1jX+K4VH9Ibm5TwqY/q2nNfSTtjuYSf+Yr3OIQTgTdxjcobBJk9uvvbYpJjg==}
|
||||
|
||||
@@ -6561,14 +6466,6 @@ packages:
|
||||
supports-color:
|
||||
optional: true
|
||||
|
||||
debug@3.2.7:
|
||||
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
|
||||
debug@4.3.6:
|
||||
resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==}
|
||||
engines: {node: '>=6.0'}
|
||||
@@ -7068,18 +6965,6 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: '>=8.40.0'
|
||||
|
||||
eslint-import-context@0.1.8:
|
||||
resolution: {integrity: sha512-bq+F7nyc65sKpZGT09dY0S0QrOnQtuDVIfyTGQ8uuvtMIF7oHp6CEP3mouN0rrnYF3Jqo6Ke0BfU/5wASZue1w==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
unrs-resolver: ^1.0.0
|
||||
peerDependenciesMeta:
|
||||
unrs-resolver:
|
||||
optional: true
|
||||
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
||||
|
||||
eslint-json-compat-utils@0.2.1:
|
||||
resolution: {integrity: sha512-YzEodbDyW8DX8bImKhAcCeu/L31Dd/70Bidx2Qex9OFUtgzXLqtfWL4Hr5fM/aCCB8QUZLuJur0S9k6UfgFkfg==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -7120,19 +7005,6 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: ^8.40.0 || ^9.0.0
|
||||
|
||||
eslint-plugin-import-x@4.15.2:
|
||||
resolution: {integrity: sha512-J5gx7sN6DTm0LRT//eP3rVVQ2Yi4hrX0B+DbWxa5er8PZ6JjLo9GUBwogIFvEDdwJaSqZplpQT+haK/cXhb7VQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/utils': ^8.0.0
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
eslint-import-resolver-node: '*'
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/utils':
|
||||
optional: true
|
||||
eslint-import-resolver-node:
|
||||
optional: true
|
||||
|
||||
eslint-plugin-jsdoc@50.7.1:
|
||||
resolution: {integrity: sha512-XBnVA5g2kUVokTNUiE1McEPse5n9/mNUmuJcx52psT6zBs2eVcXSmQBvjfa7NZdfLVSy3u1pEDDUxoxpwy89WA==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -9079,11 +8951,6 @@ packages:
|
||||
engines: {node: ^18 || >=20}
|
||||
hasBin: true
|
||||
|
||||
napi-postinstall@0.2.3:
|
||||
resolution: {integrity: sha512-Mi7JISo/4Ij2tDZ2xBE2WH+/KvVlkhA6juEjpEeRAVPNCpN3nxJo/5FhDNKgBcdmcmhaH6JjgST4xY/23ZYK0w==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
|
||||
natural-compare@1.4.0:
|
||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||
|
||||
@@ -10640,10 +10507,6 @@ packages:
|
||||
sprintf-js@1.1.3:
|
||||
resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==}
|
||||
|
||||
stable-hash-x@0.1.1:
|
||||
resolution: {integrity: sha512-l0x1D6vhnsNUGPFVDx45eif0y6eedVC8nm5uACTrVFJFtl2mLRW17aWtVyxFCpn5t94VUPkjU8vSLwIuwwqtJQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
|
||||
stackback@0.0.2:
|
||||
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
|
||||
|
||||
@@ -11366,9 +11229,6 @@ packages:
|
||||
resolution: {integrity: sha512-RyWSb5AHmGtjjNQ6gIlA67sHOsWpsbWpwDokLwTcejVdOjEkJZh7QKu14J00gDDVSh8kGH4KYC/TNBceXFZhtw==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
|
||||
unrs-resolver@1.9.0:
|
||||
resolution: {integrity: sha512-wqaRu4UnzBD2ABTC1kLfBjAqIDZ5YUTr/MLGa7By47JV1bJDSW7jq/ZSLigB7enLe7ubNaJhtnBXgrc/50cEhg==}
|
||||
|
||||
unspeech@0.1.7:
|
||||
resolution: {integrity: sha512-HQ49mqEfvkMIKsbYDfHXDxbpUuNnb+gJdLO6wjQ/iPP1VuUfXs5Ky20attrRr1Qp2S0FHWsuz7/nlv9CAHHuhg==}
|
||||
|
||||
@@ -16127,65 +15987,6 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- vue
|
||||
|
||||
'@unrs/resolver-binding-android-arm-eabi@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-android-arm64@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-darwin-arm64@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-darwin-x64@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-freebsd-x64@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-arm-gnueabihf@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-arm-musleabihf@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-arm64-gnu@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-arm64-musl@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-ppc64-gnu@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-riscv64-gnu@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-riscv64-musl@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-s390x-gnu@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-x64-gnu@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-linux-x64-musl@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-wasm32-wasi@1.9.0':
|
||||
dependencies:
|
||||
'@napi-rs/wasm-runtime': 0.2.11
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-win32-arm64-msvc@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-win32-ia32-msvc@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrs/resolver-binding-win32-x64-msvc@1.9.0':
|
||||
optional: true
|
||||
|
||||
'@unrteljs/eval@0.2.1':
|
||||
dependencies:
|
||||
builtin-modules: 5.0.0
|
||||
@@ -18060,11 +17861,6 @@ snapshots:
|
||||
dependencies:
|
||||
ms: 2.0.0
|
||||
|
||||
debug@3.2.7:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
optional: true
|
||||
|
||||
debug@4.3.6:
|
||||
dependencies:
|
||||
ms: 2.1.2
|
||||
@@ -18517,22 +18313,6 @@ snapshots:
|
||||
prettier-linter-helpers: 1.0.0
|
||||
optional: true
|
||||
|
||||
eslint-import-context@0.1.8(unrs-resolver@1.9.0):
|
||||
dependencies:
|
||||
get-tsconfig: 4.10.1
|
||||
stable-hash-x: 0.1.1
|
||||
optionalDependencies:
|
||||
unrs-resolver: 1.9.0
|
||||
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
is-core-module: '@nolyfill/is-core-module@1.0.39'
|
||||
resolve: 1.22.8
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
optional: true
|
||||
|
||||
eslint-json-compat-utils@0.2.1(eslint@9.28.0(jiti@2.4.2))(jsonc-eslint-parser@2.4.0):
|
||||
dependencies:
|
||||
eslint: 9.28.0(jiti@2.4.2)
|
||||
@@ -18574,24 +18354,6 @@ snapshots:
|
||||
synckit: 0.9.2
|
||||
optional: true
|
||||
|
||||
eslint-plugin-import-x@4.15.2(@typescript-eslint/utils@8.33.1(eslint@9.28.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint@9.28.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.34.0
|
||||
comment-parser: 1.4.1
|
||||
debug: 4.4.1
|
||||
eslint: 9.28.0(jiti@2.4.2)
|
||||
eslint-import-context: 0.1.8(unrs-resolver@1.9.0)
|
||||
is-glob: 4.0.3
|
||||
minimatch: 10.0.1
|
||||
semver: 7.7.2
|
||||
stable-hash-x: 0.1.1
|
||||
unrs-resolver: 1.9.0
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/utils': 8.33.1(eslint@9.28.0(jiti@2.4.2))(typescript@5.8.3)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-jsdoc@50.7.1(eslint@9.28.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
'@es-joy/jsdoccomment': 0.50.2
|
||||
@@ -21373,8 +21135,6 @@ snapshots:
|
||||
|
||||
nanoid@5.1.5: {}
|
||||
|
||||
napi-postinstall@0.2.3: {}
|
||||
|
||||
natural-compare@1.4.0: {}
|
||||
|
||||
natural-orderby@5.0.0: {}
|
||||
@@ -23331,8 +23091,6 @@ snapshots:
|
||||
|
||||
sprintf-js@1.1.3: {}
|
||||
|
||||
stable-hash-x@0.1.1: {}
|
||||
|
||||
stackback@0.0.2: {}
|
||||
|
||||
stackframe@1.3.4: {}
|
||||
@@ -24319,30 +24077,6 @@ snapshots:
|
||||
picomatch: 4.0.2
|
||||
webpack-virtual-modules: 0.6.2
|
||||
|
||||
unrs-resolver@1.9.0:
|
||||
dependencies:
|
||||
napi-postinstall: 0.2.3
|
||||
optionalDependencies:
|
||||
'@unrs/resolver-binding-android-arm-eabi': 1.9.0
|
||||
'@unrs/resolver-binding-android-arm64': 1.9.0
|
||||
'@unrs/resolver-binding-darwin-arm64': 1.9.0
|
||||
'@unrs/resolver-binding-darwin-x64': 1.9.0
|
||||
'@unrs/resolver-binding-freebsd-x64': 1.9.0
|
||||
'@unrs/resolver-binding-linux-arm-gnueabihf': 1.9.0
|
||||
'@unrs/resolver-binding-linux-arm-musleabihf': 1.9.0
|
||||
'@unrs/resolver-binding-linux-arm64-gnu': 1.9.0
|
||||
'@unrs/resolver-binding-linux-arm64-musl': 1.9.0
|
||||
'@unrs/resolver-binding-linux-ppc64-gnu': 1.9.0
|
||||
'@unrs/resolver-binding-linux-riscv64-gnu': 1.9.0
|
||||
'@unrs/resolver-binding-linux-riscv64-musl': 1.9.0
|
||||
'@unrs/resolver-binding-linux-s390x-gnu': 1.9.0
|
||||
'@unrs/resolver-binding-linux-x64-gnu': 1.9.0
|
||||
'@unrs/resolver-binding-linux-x64-musl': 1.9.0
|
||||
'@unrs/resolver-binding-wasm32-wasi': 1.9.0
|
||||
'@unrs/resolver-binding-win32-arm64-msvc': 1.9.0
|
||||
'@unrs/resolver-binding-win32-ia32-msvc': 1.9.0
|
||||
'@unrs/resolver-binding-win32-x64-msvc': 1.9.0
|
||||
|
||||
unspeech@0.1.7:
|
||||
dependencies:
|
||||
'@xsai-ext/shared-providers': 0.2.2
|
||||
|
||||
+1
-1
@@ -20,5 +20,5 @@ catalog:
|
||||
'@xsai/shared-chat': 0.3.0-beta.4
|
||||
'@xsai/stream-text': 0.3.0-beta.4
|
||||
'@xsai/tool': 0.3.0-beta.4
|
||||
'@xsai/utils-chat': ^0.3.0-beta.4
|
||||
'@xsai/utils-chat': 0.3.0-beta.4
|
||||
xsschema: ^0.3.0-beta.4
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
"directory": "services/discord-bot"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "dotenvx run -f .env -f .env.local --overload --ignore=MISSING_ENV_FILE -- tsx src/index.ts"
|
||||
"start": "dotenvx run -f .env -f .env.local --overload --ignore=MISSING_ENV_FILE -- tsx src/index.ts",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordjs/voice": "^0.18.0",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { REST, Routes, SlashCommandBuilder } from 'discord.js'
|
||||
|
||||
export * from './ping'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { Readable } from 'node:stream'
|
||||
|
||||
import type { AudioPlayer, VoiceConnection, VoiceConnectionState } from '@discordjs/voice'
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
import type { Client as AiriClient } from '@proj-airi/server-sdk'
|
||||
@@ -9,11 +11,11 @@ import type {
|
||||
Client as DiscordClient,
|
||||
GuildMember,
|
||||
} from 'discord.js'
|
||||
import type { Readable } from 'node:stream'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { pipeline } from 'node:stream'
|
||||
|
||||
import {
|
||||
createAudioPlayer,
|
||||
createAudioResource,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel, useLogg } from '@guiiai/logg'
|
||||
import { Client as AiriClient } from '@proj-airi/server-sdk'
|
||||
import { Client, Events, GatewayIntentBits } from 'discord.js'
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { PipelineType } from '@huggingface/transformers'
|
||||
import type { Buffer } from 'node:buffer'
|
||||
|
||||
import type { PipelineType } from '@huggingface/transformers'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { pipeline } from '@huggingface/transformers'
|
||||
import { createOpenAI } from '@xsai-ext/providers-cloud'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Readable } from 'node:stream'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
|
||||
// eliza/packages/client-discord/src/voice.ts at develop · elizaOS/eliza
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { Transform } from 'node:stream'
|
||||
|
||||
import OpusScript from 'opusscript'
|
||||
|
||||
export class OpusDecoder extends Transform {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Agent } from 'neuri'
|
||||
import type { Message } from 'neuri/openai'
|
||||
|
||||
import type { Mineflayer } from '../../libs/mineflayer'
|
||||
import type { PlanStep } from '../planning/adapter'
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@ import type { Action } from '../../libs/mineflayer'
|
||||
|
||||
import { z } from 'zod'
|
||||
|
||||
import * as skills from '../../skills'
|
||||
import { collectBlock } from '../../skills/actions/collect-block'
|
||||
import { discard, equip, putInChest, takeFromChest, viewChest } from '../../skills/actions/inventory'
|
||||
import { activateNearestBlock, placeBlock } from '../../skills/actions/world-interactions'
|
||||
import * as world from '../../skills/world'
|
||||
import { useLogger } from '../../utils/logger'
|
||||
|
||||
import * as skills from '../../skills'
|
||||
import * as world from '../../skills/world'
|
||||
|
||||
// Utils
|
||||
const pad = (str: string): string => `\n${str}\n`
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Agent, Neuri } from 'neuri'
|
||||
|
||||
import type { ChatHistory } from './types'
|
||||
|
||||
import { agent } from 'neuri'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Message } from 'neuri/openai'
|
||||
|
||||
import type { Action } from '../../libs/mineflayer'
|
||||
import type { AgentConfig, MemoryAgent } from '../../libs/mineflayer/base-agent'
|
||||
import type { Logger } from '../../utils/logger'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Agent } from 'neuri'
|
||||
|
||||
import type { Action } from '../../libs/mineflayer/action'
|
||||
|
||||
import { agent } from 'neuri'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Neuri } from 'neuri'
|
||||
|
||||
import type { Action } from '../../libs/mineflayer/action'
|
||||
import type { ActionAgent, AgentConfig, MemoryAgent, Plan, PlanningAgent } from '../../libs/mineflayer/base-agent'
|
||||
import type { PlanStep } from './adapter'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Agent, Neuri } from 'neuri'
|
||||
|
||||
import type { Mineflayer } from '../libs/mineflayer'
|
||||
|
||||
import { neuri } from 'neuri'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Neuri, NeuriContext } from 'neuri'
|
||||
|
||||
import type { Logger } from '../../utils/logger'
|
||||
import type { MineflayerWithAgents } from './types'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { NeuriContext } from 'neuri'
|
||||
import type { ChatCompletion } from 'neuri/openai'
|
||||
|
||||
import type { Logger } from '../../utils/logger'
|
||||
import type { MineflayerWithAgents } from './types'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Neuri } from 'neuri'
|
||||
|
||||
import type { Logger } from '../../utils/logger'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { NeuriContext } from 'neuri'
|
||||
import type { ChatCompletion, Message } from 'neuri/openai'
|
||||
|
||||
import type { Logger } from '../../utils/logger'
|
||||
import type { LLMConfig, LLMResponse } from './types'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Client } from '@proj-airi/server-sdk'
|
||||
import type { Neuri } from 'neuri'
|
||||
|
||||
import type { Mineflayer } from '../mineflayer'
|
||||
import type { ActionAgent, ChatAgent, PlanningAgent } from '../mineflayer/base-agent'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Neuri, NeuriContext } from 'neuri'
|
||||
|
||||
import type { Logger } from '../../utils/logger'
|
||||
import type { MineflayerWithAgents } from './types'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { z } from 'zod'
|
||||
|
||||
import type { Mineflayer } from './core'
|
||||
|
||||
type ActionResult = string | Promise<string>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
|
||||
import type { Handler } from './types'
|
||||
|
||||
import { useLogger } from '../../utils/logger'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
import type { Bot, BotOptions } from 'mineflayer'
|
||||
|
||||
import type { MineflayerPlugin } from './plugin'
|
||||
import type { TickEvents, TickEventsHandler } from './ticker'
|
||||
import type { EventHandlers, EventsHandler } from './types'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Message } from 'neuri/openai'
|
||||
|
||||
import type { Action } from './action'
|
||||
|
||||
export class Memory {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Bot, BotOptions, Plugin } from 'mineflayer'
|
||||
|
||||
import type { Mineflayer } from '.'
|
||||
|
||||
export interface MineflayerPlugin {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import process, { exit } from 'node:process'
|
||||
|
||||
import { Client } from '@proj-airi/server-sdk'
|
||||
import MineflayerArmorManager from 'mineflayer-armor-manager'
|
||||
import { loader as MineflayerAutoEat } from 'mineflayer-auto-eat'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Block } from 'prismarine-block'
|
||||
|
||||
import type { Mineflayer } from '../../libs/mineflayer'
|
||||
|
||||
import pathfinder from 'mineflayer-pathfinder'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Item } from 'prismarine-item'
|
||||
|
||||
import type { Mineflayer } from '../../libs/mineflayer'
|
||||
|
||||
import { useLogger } from '../../utils/logger'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Bot } from 'mineflayer'
|
||||
import type { Block } from 'prismarine-block'
|
||||
|
||||
import type { Mineflayer } from '../../libs/mineflayer'
|
||||
|
||||
import pathfinder from 'mineflayer-pathfinder'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { SafeBlock } from 'mineflayer-pathfinder'
|
||||
|
||||
import type { Mineflayer } from '../libs/mineflayer'
|
||||
import type { BlockFace } from './base'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Entity } from 'prismarine-entity'
|
||||
import type { Item } from 'prismarine-item'
|
||||
|
||||
import type { Mineflayer } from '../libs/mineflayer'
|
||||
|
||||
import pathfinderModel from 'mineflayer-pathfinder'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Block } from 'prismarine-block'
|
||||
import type { Item } from 'prismarine-item'
|
||||
import type { Recipe } from 'prismarine-recipe'
|
||||
|
||||
import type { Mineflayer } from '../libs/mineflayer'
|
||||
|
||||
import { useLogger } from '../utils/logger'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Entity } from 'prismarine-entity'
|
||||
|
||||
import type { Mineflayer } from '../libs/mineflayer'
|
||||
|
||||
import { randomInt } from 'es-toolkit'
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { Block } from 'prismarine-block'
|
||||
import type { Entity } from 'prismarine-entity'
|
||||
import type { Item } from 'prismarine-item'
|
||||
import type { Vec3 } from 'vec3'
|
||||
|
||||
import type { Mineflayer } from '../libs/mineflayer'
|
||||
|
||||
import pf from 'mineflayer-pathfinder'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { defineConfig } from 'drizzle-kit'
|
||||
|
||||
import 'dotenv/config'
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"start": "dotenvx run -f .env -f .env.local --overload --ignore=MISSING_ENV_FILE -- tsx --max-old-space-size=8192 src/index.ts",
|
||||
"db:generate": "drizzle-kit generate",
|
||||
"db:push": "dotenvx run -f .env -f .env.local --overload --ignore=MISSING_ENV_FILE -- drizzle-kit push",
|
||||
"script:embed-chat": "dotenvx run -f .env -f .env.local --overload --ignore=MISSING_ENV_FILE -- tsx scripts/embed-all-chat-messages.ts"
|
||||
"script:embed-chat": "dotenvx run -f .env -f .env.local --overload --ignore=MISSING_ENV_FILE -- tsx scripts/embed-all-chat-messages.ts",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dotenvx/dotenvx": "^1.44.2",
|
||||
@@ -30,6 +31,7 @@
|
||||
"@xsai/generate-text": "catalog:",
|
||||
"@xsai/shared-chat": "catalog:",
|
||||
"@xsai/tool": "catalog:",
|
||||
"@xsai/utils-chat": "catalog:",
|
||||
"best-effort-json-parser": "^1.1.3",
|
||||
"dotenv": "^16.5.0",
|
||||
"drizzle-orm": "^0.44.2",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { embed } from '@xsai/embed'
|
||||
import { eq, isNull } from 'drizzle-orm'
|
||||
import { chunk } from 'es-toolkit'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { AttentionConfig, AttentionState, BotSelf } from '../../types'
|
||||
|
||||
export function createAttentionHandler(bot: BotSelf, config: AttentionConfig) {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
import type { Message as LLMMessage } from '@xsai/shared-chat'
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { BotSelf, ExtendedContext } from '../../types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { message } from '@xsai/utils-chat'
|
||||
import { Bot } from 'grammy'
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { BotSelf, ReadMessagesAction } from '../../../types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { embed } from '@xsai/embed'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { BotSelf } from '../../../types'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { drizzle } from 'drizzle-orm/node-postgres'
|
||||
|
||||
import * as schema from './schema'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import process from 'node:process'
|
||||
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel, useLogg } from '@guiiai/logg'
|
||||
|
||||
import { startTelegramBot } from './bots/telegram'
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import type { Message as LLMMessage } from '@xsai/shared-chat'
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { Action } from '../types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { Format, useLogg } from '@guiiai/logg'
|
||||
import { generateText } from '@xsai/generate-text'
|
||||
import { message } from '@xsai/utils-chat'
|
||||
|
||||
@@ -6,6 +6,7 @@ import { promises as fs } from 'node:fs'
|
||||
import os from 'node:os'
|
||||
import path from 'node:path'
|
||||
import { env } from 'node:process'
|
||||
|
||||
import ffmpegInstaller from '@ffmpeg-installer/ffmpeg'
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { generateText } from '@xsai/generate-text'
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import type { Message, PhotoSize } from 'grammy/types'
|
||||
|
||||
import type { BotSelf } from '../types'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { embed } from '@xsai/embed'
|
||||
import { generateText } from '@xsai/generate-text'
|
||||
import { message } from '@xsai/utils-chat'
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Message, Sticker } from 'grammy/types'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { embed } from '@xsai/embed'
|
||||
import { generateText } from '@xsai/generate-text'
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { SQL } from 'drizzle-orm'
|
||||
import type { Message, UserFromGetMe } from 'grammy/types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { embed } from '@xsai/embed'
|
||||
import { and, cosineDistance, desc, eq, gt, inArray, lt, ne, notInArray, sql } from 'drizzle-orm'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { chatMessagesTable } from '../db/schema'
|
||||
|
||||
import { findPhotoDescription } from './photos'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { message } from '@xsai/utils-chat'
|
||||
|
||||
import { div, span } from './utils'
|
||||
@@ -5,7 +7,7 @@ import { div, span } from './utils'
|
||||
export function personality() {
|
||||
return message.system(
|
||||
div(
|
||||
systemPrompt(),
|
||||
// systemPrompt(),
|
||||
span(''
|
||||
+ '> Forget about everything as being a helpful assistant. '
|
||||
+ '> Forget about everything as being a helpful assistant. '
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { FileFlavor } from '@grammyjs/files'
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
import type { Bot, Context } from 'grammy'
|
||||
import type { Message } from 'grammy/types'
|
||||
|
||||
import type { createAttentionHandler } from './bots/telegram/attention-handler'
|
||||
import type { CancellablePromise } from './utils/promise'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { cwd } from 'node:process'
|
||||
|
||||
import { loadEnv } from 'vite'
|
||||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "playwright install chromium && tsx src/main.ts",
|
||||
"mcp:ui": "pnpx @modelcontextprotocol/inspector"
|
||||
"mcp:ui": "pnpx @modelcontextprotocol/inspector",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@browserbasehq/stagehand": "^2.3.0",
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { TwitterServices } from '../types/services'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { createServer } from 'node:http'
|
||||
|
||||
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js'
|
||||
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js'
|
||||
import { createApp, createRouter, defineEventHandler, toNodeListener } from 'h3'
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Config } from './types'
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import process from 'node:process'
|
||||
|
||||
import { defu } from 'defu'
|
||||
import { config as configDotenv } from 'dotenv'
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { Browser, BrowserContext, Page } from 'playwright'
|
||||
|
||||
import type { Config } from '../../config/types'
|
||||
|
||||
import fs from 'node:fs'
|
||||
|
||||
import { chromium } from 'playwright'
|
||||
|
||||
import { TWITTER_SESSION_FILE } from '../../constants'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Cookie } from 'playwright'
|
||||
|
||||
import type { TwitterService } from '../../types/services'
|
||||
import type { Context } from '../browser/context'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Context } from 'node:vm'
|
||||
|
||||
import type { AiriAdapter } from './adapters/airi-adapter'
|
||||
import type { MCPAdapter } from './adapters/mcp-adapter'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Page } from 'playwright'
|
||||
|
||||
import type { UserLink, UserProfile, UserStats } from '../core/services/user'
|
||||
|
||||
import { logger } from '../utils/logger'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ElementHandle, Page } from 'playwright'
|
||||
|
||||
import type { Tweet } from '../core/services/tweet'
|
||||
|
||||
import { logger } from '../utils/logger'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import path from 'node:path'
|
||||
|
||||
import { createLogg, Format, LogLevel, setGlobalFormat, setGlobalLogLevel } from '@guiiai/logg'
|
||||
|
||||
import { useConfigManager } from '../config'
|
||||
|
||||
Reference in New Issue
Block a user