@devkitvault/recall 1.2.2 → 1.2.3

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.
@@ -67,10 +67,18 @@ function printAskError(err) {
67
67
  }
68
68
  console.error(chalk_1.default.red('\n Failed to resolve that request.\n'));
69
69
  }
70
- async function saveSuggestion(token, command, name, source, risk) {
70
+ function parseTags(raw) {
71
+ const tags = (raw ?? '')
72
+ .split(',')
73
+ .map((t) => t.trim())
74
+ .filter(Boolean);
75
+ return tags.length ? tags : undefined;
76
+ }
77
+ async function saveSuggestion(token, command, name, source, risk, tags) {
71
78
  await api_1.ApiClient.post('/commands', {
72
79
  command,
73
80
  name: name?.trim() || undefined,
81
+ tags,
74
82
  }, token);
75
83
  await (0, events_1.track)('ai_accepted', { source, risk, saved: true });
76
84
  console.log(chalk_1.default.green('\n Saved.\n'));
@@ -116,13 +124,20 @@ async function runAsk(query) {
116
124
  }]);
117
125
  if (!save)
118
126
  return;
119
- const { name } = await inquirer_1.default.prompt([{
127
+ const { name, tags } = await inquirer_1.default.prompt([
128
+ {
120
129
  type: 'input',
121
130
  name: 'name',
122
131
  message: 'Name (optional):',
123
- }]);
132
+ },
133
+ {
134
+ type: 'input',
135
+ name: 'tags',
136
+ message: 'Tags (optional):',
137
+ },
138
+ ]);
124
139
  try {
125
- await saveSuggestion(token, result.command, name, result.source, result.risk);
140
+ await saveSuggestion(token, result.command, name, result.source, result.risk, parseTags(tags));
126
141
  }
127
142
  catch (err) {
128
143
  printAskError(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkitvault/recall",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "recall CLI — AI terminal copilot with a personal command vault",
5
5
  "keywords": [
6
6
  "cli",