mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2026-10-18 01:20:29 +00:00
Compare commits
1 Commits
225c2e3c4f
..
sonia
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bc20ea40d |
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
# Disable Discord community banner (optional)
|
||||
# Uncomment the line below to hide the Discord banner
|
||||
# NEXT_PUBLIC_DISABLE_DISCORD_BANNER=true
|
||||
NEXT_PUBLIC_DISABLE_DISCORD_BANNER=true
|
||||
+6
-1
@@ -1,4 +1,9 @@
|
||||
.idea/
|
||||
bun.lock
|
||||
.env
|
||||
|
||||
node_modules
|
||||
.next
|
||||
.env.local
|
||||
.env*.local
|
||||
.env*.local
|
||||
.env
|
||||
|
||||
@@ -17,7 +17,6 @@ You can also build and run Sucker as a Docker container with `docker compose bui
|
||||
|
||||
### Changelog
|
||||
|
||||
- 2.3: ECHO. Put ECHO: anywhere in a message and sucker repeats whatever comes after it in the reply — for triggering char-side script and lorebook keywords.
|
||||
- 2.2: Added support for directly inputting webp file names or character image links when creating PNG character cards
|
||||
- 2.1: updated deps, note about image fetching, list of mirrors
|
||||
- 2.0: from Tui: Multimessage support! Tracks changes to character descriptions and scenarios across multiple extractions. Shows version badges, message counts, and provides detailed change history viewer.
|
||||
|
||||
@@ -2,6 +2,5 @@ services:
|
||||
web:
|
||||
build: .
|
||||
image: sucker
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
@@ -93,15 +93,6 @@ function parseConversationToken(content: string | undefined | null): string | nu
|
||||
return null;
|
||||
}
|
||||
|
||||
function parseEchoText(content: string | undefined | null): string | null {
|
||||
if (!content) return null;
|
||||
const match = content.match(/ECHO:\s*([\s\S]+)/i);
|
||||
if (match && match[1].trim()) {
|
||||
return match[1].trim();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function removePersonaTags(content: string): string {
|
||||
let result = content;
|
||||
const openingMatch = result.match(/<[^<>]+?\s*'s\s+Persona>/i);
|
||||
@@ -496,18 +487,6 @@ export async function POST(request: NextRequest) {
|
||||
responseMessage = `New character "${extracted.data.name}" created (v1).${tokenNote}`;
|
||||
}
|
||||
|
||||
// Echo back anything the user sent after an "ECHO:" marker in their
|
||||
// latest message, appended after the normal status message
|
||||
const lastUserMessage =
|
||||
[...body.messages]
|
||||
.reverse()
|
||||
.find((m: { role?: string }) => m?.role === "user") ??
|
||||
body.messages[body.messages.length - 1];
|
||||
const echoText = parseEchoText(lastUserMessage?.content);
|
||||
if (echoText) {
|
||||
responseMessage += `\n\n${echoText}`;
|
||||
}
|
||||
|
||||
cleanupExpiredCards();
|
||||
|
||||
// Return SSE response if requested, otherwise JSON
|
||||
@@ -549,7 +528,7 @@ export async function POST(request: NextRequest) {
|
||||
console.error("Error processing request:", error);
|
||||
|
||||
const errorMessage =
|
||||
"You dingus, read the directions on sucker before trying again. If you're trying to suck a bot with more tokens than your current context limit, try bumping your Context Size setting up on Generation Settings.";
|
||||
"You dingus, read the directions on sucker before trying again.";
|
||||
|
||||
// Check if this was a streaming request
|
||||
const acceptHeader = request.headers.get("accept");
|
||||
|
||||
+869
-924
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ interface DiscordBannerPermanentProps {
|
||||
export function DiscordBannerPermanent({
|
||||
inviteLink,
|
||||
serverName = "Avalon",
|
||||
description = "Avalon is an enchanted creative haven for a growing collective of botmakers and users—part workshop, part myth, part digital forest where strange and beautiful ideas come to life. Enter our little woodland here:",
|
||||
description = "Looking for somewhere more... interesting? Avalon's an enchanted collective of botmakers who refuse to be boring 🌿 Come play with us~ (18+ only, darling)",
|
||||
ctaText = "Join Server",
|
||||
}: DiscordBannerPermanentProps) {
|
||||
return (
|
||||
@@ -69,7 +69,7 @@ export function DiscordBannerPermanent({
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="text-white font-semibold text-base mb-0.5">{serverName}</div>
|
||||
<div className="text-[#b9bbbe] text-sm space-y-0.5">
|
||||
<div className="font-medium">295 members</div>
|
||||
<div className="font-medium">67 members</div>
|
||||
<a
|
||||
href="https://from-avalon.com"
|
||||
target="_blank"
|
||||
|
||||
Reference in New Issue
Block a user