antenna-fyi 1.3.17 → 1.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +16 -13
- package/lib/core.js +6 -0
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -47,9 +47,9 @@ export async function handleScan(f) {
|
|
|
47
47
|
}
|
|
48
48
|
result.profiles.forEach((p) => {
|
|
49
49
|
console.log(` ${p.emoji} ${p.name}${p.distance_m != null ? ` (${Math.round(p.distance_m)}m)` : ""}`);
|
|
50
|
-
if (p.
|
|
51
|
-
if (p.
|
|
52
|
-
if (p.
|
|
50
|
+
if (p.personal_description) console.log(` ${p.personal_description}`);
|
|
51
|
+
if (p.looking_for) console.log(` ${p.looking_for}`);
|
|
52
|
+
if (p.conversation_style) console.log(` ${p.conversation_style}`);
|
|
53
53
|
console.log(` ref: ${p.ref}\n`);
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -81,11 +81,14 @@ export async function handleProfile(f) {
|
|
|
81
81
|
console.log(JSON.stringify(data, null, 2));
|
|
82
82
|
} else {
|
|
83
83
|
const data = await getProfile({ device_id: id });
|
|
84
|
-
if (!data) return console.log("No profile yet. Create one with --name and --
|
|
84
|
+
if (!data) return console.log("No profile yet. Create one with --name and --personal-description");
|
|
85
85
|
console.log(`${data.emoji || "👤"} ${data.display_name || "Anonymous"}`);
|
|
86
|
-
if (data.
|
|
87
|
-
if (data.
|
|
88
|
-
if (data.
|
|
86
|
+
if (data.personal_description) console.log(` ${data.personal_description}`);
|
|
87
|
+
if (data.looking_for) console.log(` Looking for: ${data.looking_for}`);
|
|
88
|
+
if (data.conversation_style) console.log(` Conversation: ${data.conversation_style}`);
|
|
89
|
+
if (data.interest_tags?.length) console.log(` Tags: ${data.interest_tags.join(", ")}`);
|
|
90
|
+
if (data.city) console.log(` 📍 ${data.city}`);
|
|
91
|
+
if (data.context) console.log(` More info: ${data.context}`);
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -128,7 +131,7 @@ export async function handleMatches(f) {
|
|
|
128
131
|
}
|
|
129
132
|
for (const m of result.incoming_accepts) {
|
|
130
133
|
console.log(`📩 WANTS TO MEET YOU: ${m.emoji} ${m.name}`);
|
|
131
|
-
if (m.
|
|
134
|
+
if (m.personal_description) console.log(` ${m.personal_description}`);
|
|
132
135
|
console.log(` Accept: antenna accept --id ${f.id} --ref ${m.ref}`);
|
|
133
136
|
console.log();
|
|
134
137
|
}
|
|
@@ -142,9 +145,9 @@ export async function handleDiscover(f) {
|
|
|
142
145
|
console.log(`🌍 Global discover:\n`);
|
|
143
146
|
result.profiles.forEach((p) => {
|
|
144
147
|
console.log(` ${p.emoji} ${p.name}`);
|
|
145
|
-
if (p.
|
|
146
|
-
if (p.
|
|
147
|
-
if (p.
|
|
148
|
+
if (p.personal_description) console.log(` ${p.personal_description}`);
|
|
149
|
+
if (p.looking_for) console.log(` ${p.looking_for}`);
|
|
150
|
+
if (p.conversation_style) console.log(` ${p.conversation_style}`);
|
|
148
151
|
if (p.match_reason) console.log(` → ${p.match_reason}`);
|
|
149
152
|
console.log(` ref: ${p.ref}\n`);
|
|
150
153
|
});
|
|
@@ -229,7 +232,7 @@ export async function handleEvent(f) {
|
|
|
229
232
|
const creatorTag = p.role === "creator" ? " [主办]" : "";
|
|
230
233
|
const statusTag = p.status === "pending" ? " 🟡待审批" : "";
|
|
231
234
|
console.log(` ${p.emoji} ${p.name}${creatorTag}${badge}${statusTag}`);
|
|
232
|
-
if (p.
|
|
235
|
+
if (p.personal_description) console.log(` ${p.personal_description}`);
|
|
233
236
|
if (p.application_context) console.log(` 📝 ${p.application_context}`);
|
|
234
237
|
console.log(` ref: ${p.ref}\n`);
|
|
235
238
|
});
|
|
@@ -763,7 +766,7 @@ export async function handleWatch(f) {
|
|
|
763
766
|
for (const m of initial.incoming_accepts) {
|
|
764
767
|
const key = `incoming:${m._device_id}`;
|
|
765
768
|
notified.add(key);
|
|
766
|
-
_log(` ${m.emoji || "👤"} ${m.name} — ${m.
|
|
769
|
+
_log(` ${m.emoji || "👤"} ${m.name} — ${m.personal_description || ""}`);
|
|
767
770
|
}
|
|
768
771
|
saveNotified(notified);
|
|
769
772
|
_log("");
|
package/lib/core.js
CHANGED
|
@@ -215,6 +215,12 @@ export async function getProfile({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
215
215
|
data.context = ctx.context || null;
|
|
216
216
|
} catch {}
|
|
217
217
|
}
|
|
218
|
+
|
|
219
|
+
// Add semantic field aliases
|
|
220
|
+
data.personal_description = data.line1 || null;
|
|
221
|
+
data.looking_for = data.line2 || null;
|
|
222
|
+
data.conversation_style = data.line3 || null;
|
|
223
|
+
|
|
218
224
|
return data;
|
|
219
225
|
}
|
|
220
226
|
|