v0.2.43 - Fix /help adopted-skills section to use latest kind 10123 event by created_at in CLI and HTTP views
This commit is contained in:
@@ -54,11 +54,11 @@ Skills compose by adoption-list order (`10123`) and trigger tags carry runtime e
|
||||
|
||||
Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers.
|
||||
|
||||
## Current Status — v0.2.42
|
||||
## Current Status — v0.2.43
|
||||
|
||||
**Active build — this project is barely working. Experiment at your own risk.**
|
||||
|
||||
> Last release update: v0.2.42 — Make skill_refresh re-query relays and reload self-skill cache before invalidating adopted-skills cache
|
||||
> Last release update: v0.2.43 — Fix /help adopted-skills section to use latest kind 10123 event by created_at in CLI and HTTP views
|
||||
|
||||
- Connects to configured relays with auto-reconnect and relay state transition logging
|
||||
- Publishes configured startup events per relay as each relay becomes connected
|
||||
|
||||
16
src/agent.c
16
src/agent.c
@@ -681,7 +681,21 @@ static char* build_slash_help_all_json(void) {
|
||||
|
||||
int adopted_count = 0;
|
||||
if (adoption_events && cJSON_IsArray(adoption_events) && cJSON_GetArraySize(adoption_events) > 0) {
|
||||
cJSON* ev0 = cJSON_GetArrayItem(adoption_events, 0);
|
||||
cJSON* ev0 = NULL;
|
||||
double best_created = -1.0;
|
||||
int an = cJSON_GetArraySize(adoption_events);
|
||||
for (int ai = 0; ai < an; ai++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(adoption_events, ai);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!ev0 || created > best_created) {
|
||||
ev0 = ev;
|
||||
best_created = created;
|
||||
}
|
||||
}
|
||||
cJSON* tags = ev0 ? cJSON_GetObjectItemCaseSensitive(ev0, "tags") : NULL;
|
||||
if (tags && cJSON_IsArray(tags)) {
|
||||
int tn = cJSON_GetArraySize(tags);
|
||||
|
||||
@@ -815,7 +815,21 @@ static char* build_slash_help_all_json_local(void) {
|
||||
|
||||
int adopted_count = 0;
|
||||
if (adoption_events && cJSON_IsArray(adoption_events) && cJSON_GetArraySize(adoption_events) > 0) {
|
||||
cJSON* ev0 = cJSON_GetArrayItem(adoption_events, 0);
|
||||
cJSON* ev0 = NULL;
|
||||
double best_created = -1.0;
|
||||
int an = cJSON_GetArraySize(adoption_events);
|
||||
for (int ai = 0; ai < an; ai++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(adoption_events, ai);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!ev0 || created > best_created) {
|
||||
ev0 = ev;
|
||||
best_created = created;
|
||||
}
|
||||
}
|
||||
cJSON* tags = ev0 ? cJSON_GetObjectItemCaseSensitive(ev0, "tags") : NULL;
|
||||
if (tags && cJSON_IsArray(tags)) {
|
||||
int tn = cJSON_GetArraySize(tags);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
// Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
||||
#define DIDACTYL_VERSION_MAJOR 0
|
||||
#define DIDACTYL_VERSION_MINOR 2
|
||||
#define DIDACTYL_VERSION_PATCH 42
|
||||
#define DIDACTYL_VERSION "v0.2.42"
|
||||
#define DIDACTYL_VERSION_PATCH 43
|
||||
#define DIDACTYL_VERSION "v0.2.43"
|
||||
|
||||
// Agent metadata
|
||||
#define DIDACTYL_NAME "Didactyl"
|
||||
|
||||
Reference in New Issue
Block a user