Disabled stripping feature from 0.34.4 because it needs more testing.
This commit is contained in:
parent
319d49d439
commit
3851825370
1 changed files with 6 additions and 4 deletions
10
zynk.c
10
zynk.c
|
|
@ -29,7 +29,7 @@ int asprintf(char **, const char *, ...);
|
|||
|
||||
/* ---- constants ---- */
|
||||
|
||||
#define VERSION "0.34.4"
|
||||
#define VERSION "0.34.5"
|
||||
#define DEFAULT_SERVER "irc.libera.chat"
|
||||
#define OPENCODE_BIN "/usr/bin/opencode"
|
||||
#define CLR_RESET "\033[0m"
|
||||
|
|
@ -1314,7 +1314,8 @@ static void strip_formatting(char *s) {
|
|||
*dst = 0;
|
||||
}
|
||||
|
||||
static void strip_opencode_header(char *s) {
|
||||
// This needs to be tested more.
|
||||
/*static void strip_opencode_header(char *s) {
|
||||
if (!s || s[0] != '>' || s[1] != ' ') return;
|
||||
char *sep = strstr(s, " \xc2\xb7 ");
|
||||
if (!sep) sep = strstr(s, " · ");
|
||||
|
|
@ -1326,7 +1327,7 @@ static void strip_opencode_header(char *s) {
|
|||
} else {
|
||||
s[0] = 0;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
* has_crlf - Check if a string contains CR or LF characters.
|
||||
|
|
@ -1672,7 +1673,8 @@ static void ai_child_task(Session *s, long long id, const char *agent) {
|
|||
} else if (olen == 0) {
|
||||
ai_set_answer(id, "AI returned an empty response");
|
||||
} else {
|
||||
strip_opencode_header(out);
|
||||
// Needs more testing.
|
||||
//strip_opencode_header(out);
|
||||
strip_formatting(out);
|
||||
strip_ai_phrases(out);
|
||||
ai_set_answer(id, out);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue