paint: text to text node fixes

This commit is contained in:
luboslenco
2026-08-12 20:32:20 +02:00
parent 7f70170c91
commit 89596ae511
@@ -17,7 +17,7 @@ static char *text_to_text_node_grok_dir(void) {
static char *text_to_text_node_project_contents(void) {
buffer_t *encoded = util_encode_project(g_project);
char *json = armpack_decode_to_json_omit_buffers(encoded);
char *json = armpack_decode_to_json_omit_large_arrays(encoded);
return string("/* Current project state:\n%s\n*/\n", json);
}
@@ -128,7 +128,7 @@ void text_to_text_node_run(char *prompt, void (*done)(char *)) {
string_array_t *argv;
if (text_to_text_node_backend == CONSOLE_MODEL_CLAUDE) {
iron_file_save_bytes(string("%s%sapi.h", dir, PATH_SEP), (buffer_t *)u8_array_create_from_string(reference), 0);
iron_file_save_bytes(string("%s%sapi.h", dir, PATH_SEP), sys_string_to_buffer(reference), 0);
argv = text_to_text_node_claude_args(dir, prompt);
}
else if (text_to_text_node_backend == CONSOLE_MODEL_GROK) {
@@ -137,15 +137,15 @@ void text_to_text_node_run(char *prompt, void (*done)(char *)) {
iron_create_directory(gdir);
}
char *rules = string("%s\n%s\n", api, text_to_text_node_guide);
iron_file_save_bytes(string("%s%sAGENTS.md", gdir, PATH_SEP), (buffer_t *)u8_array_create_from_string(rules), 0);
iron_file_save_bytes(string("%s%sAGENTS.md", gdir, PATH_SEP), sys_string_to_buffer(rules), 0);
char *full = string("%s\n%s\n\n%s", contents, prompt, text_to_text_node_guide);
iron_file_save_bytes(string("%s%sprompt.txt", gdir, PATH_SEP), (buffer_t *)u8_array_create_from_string(full), 0);
iron_file_save_bytes(string("%s%sprompt.txt", gdir, PATH_SEP), sys_string_to_buffer(full), 0);
argv = text_to_text_node_grok_args(gdir);
}
else {
char *full = string("%s%s", reference, prompt);
iron_file_save_bytes(string("%s%sprompt.txt", dir, PATH_SEP), (buffer_t *)u8_array_create_from_string(full), 0);
iron_file_save_bytes(string("%s%sprompt.txt", dir, PATH_SEP), sys_string_to_buffer(full), 0);
argv = text_to_text_node_qwen_args(dir);
}