1
0
This commit is contained in:
2026-03-22 12:41:48 +09:00
parent a7402ae6a2
commit b58c476236
4 changed files with 1163 additions and 0 deletions

17
.gitignore vendored Normal file
View File

@@ -0,0 +1,17 @@
/dist
/repos
/target
/CLAUDE.md
/.claude
node_modules
package-lock.json
Cargo.lock
.env
.mcp.json
bot
/public/at/*/ai.syui.ue.*
/public/at/*/ai.syui.note.*
/wiki
/src/rules/note.md
/src/rules/manga.md
/src/rules/novel.md

17
Cargo.toml Normal file
View File

@@ -0,0 +1,17 @@
[package]
name = "aichat"
version = "0.1.0"
edition = "2021"
[dependencies]
axum = "0.7"
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
rusqlite = { version = "0.32", features = ["bundled"] }
tower-http = { version = "0.5", features = ["cors"] }
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4"] }
tracing = "0.1"
tracing-subscriber = "0.3"
base64 = "0.22"

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM rust:1.90 AS builder
WORKDIR /app
COPY Cargo.toml Cargo.lock* ./
COPY src ./src
RUN cargo build --release
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/aichat /usr/local/bin/aichat
VOLUME /data
ENV DB_PATH=/data/chat.db
ENV PORT=3100
EXPOSE 3100
CMD ["aichat"]

1115
src/main.rs Normal file

File diff suppressed because it is too large Load Diff