mirror of
https://github.com/jie65535/JChatGPT.git
synced 2026-06-23 00:49:31 +08:00
Introduce a cross-group skill system that lets the bot distill reusable
knowledge into markdown docs and load them on demand, keeping day-to-day
context pollution low.
- SkillStore manages data/skills/*.md files with name/description
frontmatter and an in-memory index cache (rebuilt on init/reload)
- Only the skill index (name + one-line description) is injected via the
new {skills} system-prompt placeholder; bodies load on demand
- New tools: loadSkill / saveSkill (upsert, iterate = load+overwrite) /
deleteSkill, gated by PluginConfig.skillsEnabled
- Skill names validated against ^[A-Za-z0-9_-]+$ to prevent traversal
- Wire SkillStore.init into onEnable and refresh on /jgpt reload; add
/jgpt skills listing command
- Bump version to 1.12.0; update README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
plugins {
|
|
val kotlinVersion = "2.0.20"
|
|
kotlin("jvm") version kotlinVersion
|
|
kotlin("plugin.serialization") version kotlinVersion
|
|
|
|
id("net.mamoe.mirai-console") version "2.16.0"
|
|
}
|
|
|
|
group = "top.jie65535.mirai"
|
|
version = "1.12.0"
|
|
|
|
mirai {
|
|
jvmTarget = JavaVersion.VERSION_11
|
|
noTestCore = true
|
|
setupConsoleTestRuntime {
|
|
// 移除 mirai-core 依赖
|
|
classpath = classpath.filter {
|
|
!it.nameWithoutExtension.startsWith("mirai-core-jvm")
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven("https://maven.aliyun.com/repository/public")
|
|
mavenCentral()
|
|
}
|
|
|
|
val openaiClientVersion = "4.1.0"
|
|
val ktorVersion = "3.0.3"
|
|
val jLatexMathVersion = "1.0.7"
|
|
val commonTextVersion = "1.13.0"
|
|
val hibernateVersion = "2.9.0"
|
|
val overflowVersion = "1.0.7"
|
|
|
|
dependencies {
|
|
implementation("com.aallam.openai:openai-client:$openaiClientVersion")
|
|
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
|
|
implementation("org.scilab.forge:jlatexmath:$jLatexMathVersion")
|
|
implementation("org.apache.commons:commons-text:$commonTextVersion")
|
|
|
|
// 聊天记录插件
|
|
compileOnly("xyz.cssxsh.mirai:mirai-hibernate-plugin:$hibernateVersion")
|
|
|
|
testConsoleRuntime("top.mrxiaom.mirai:overflow-core:$overflowVersion")
|
|
} |