mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2025-10-28 04:35:45 +00:00
fix: mooth's bug, I like to call it
This commit is contained in:
@@ -4,6 +4,7 @@ Check package.json for commands, I can't be bothered.
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
- 1.3: Mooth found a bug, fixed it.
|
||||||
- 1.2: Fix for Janitor having changed their prompt system
|
- 1.2: Fix for Janitor having changed their prompt system
|
||||||
- 1.1: Fix for R1 handling change, blank user persona bug
|
- 1.1: Fix for R1 handling change, blank user persona bug
|
||||||
- 1.0: Yup.
|
- 1.0: Yup.
|
||||||
|
|||||||
@@ -46,13 +46,19 @@ function findTagsBetween(content: string, startMarker: string, endMarker: string
|
|||||||
if (endIdx === -1) return [];
|
if (endIdx === -1) return [];
|
||||||
|
|
||||||
const section = content.slice(startIdx + startMarker.length + 2, endIdx);
|
const section = content.slice(startIdx + startMarker.length + 2, endIdx);
|
||||||
const tagRegex = /<([^/>]+)>([^<]+)<\/\1>/g;
|
const matches: PersonaMatch[] = [];
|
||||||
const matches = Array.from(section.matchAll(tagRegex));
|
|
||||||
|
|
||||||
return matches.map(match => ({
|
const tagPattern = /<([^/>][^>]*)>([^]*?)<\/\1>/g;
|
||||||
|
let match;
|
||||||
|
|
||||||
|
while ((match = tagPattern.exec(section)) !== null) {
|
||||||
|
matches.push({
|
||||||
tag: match[1],
|
tag: match[1],
|
||||||
content: match[2].trim()
|
content: match[2].trim()
|
||||||
}));
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractBetweenTags(content: string, tag: string): string {
|
function extractBetweenTags(content: string, tag: string): string {
|
||||||
|
|||||||
@@ -187,9 +187,9 @@ export default function Home() {
|
|||||||
<div className="container mx-auto px-4 py-8">
|
<div className="container mx-auto px-4 py-8">
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center mb-4">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold">Sucker v1.2</h1>
|
<h1 className="text-3xl font-bold">Sucker v1.3</h1>
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
If it's any consolation, I hate making these changes too.
|
I still hate making these changes, but Mooth found a bug so I fixed it.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user