|
|
@@ -1,7 +1,9 @@ |
|
|
|
#include <iostream> |
|
|
|
#include <string> |
|
|
|
#include <vector> |
|
|
|
#include "any.h" |
|
|
|
#include "ctx_test2.h" |
|
|
|
#include "llm.h" |
|
|
|
#include "main.h" |
|
|
|
#include "memory_Context.h" |
|
|
|
|
|
|
@@ -94,6 +96,18 @@ int main() { |
|
|
|
memory_hideMatchingItems, |
|
|
|
memory_selectItem, |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
auto printOutput = [](memory_Context c) { |
|
|
|
if (llm_startsWith(c.recentField, "output")) { |
|
|
|
std::cout |
|
|
|
<< libany::any_cast<std::string>(c.field(c.recentField)) |
|
|
|
<< std::endl; |
|
|
|
} |
|
|
|
}; |
|
|
|
ctrl.registerCallback(printOutput); |
|
|
|
ctrl.registerFieldCallback("exit", [](memory_Context c) { exit(0); }); |
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
auto c = shell_createContext(); |
|
|
|