@circleback/cli 0.1.1 → 0.1.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.
@@ -107,8 +107,9 @@ const login = async () => {
107
107
  authorizeUrl.searchParams.set('code_challenge_method', 'S256');
108
108
  const url = authorizeUrl.toString();
109
109
  const isWindows = process.platform === 'win32';
110
+ const escapedUrl = isWindows ? url.replace(/&/g, '^&') : url;
110
111
  const [command, ...arguments_] = isWindows
111
- ? ['start', '', url]
112
+ ? ['start', '', escapedUrl]
112
113
  : process.platform === 'darwin'
113
114
  ? ['open', url]
114
115
  : ['xdg-open', url];
@@ -20,7 +20,7 @@ const formatForTool = (toolName, data) => {
20
20
  case 'ReadMeetings':
21
21
  return (0, table_1.formatMeetingDetails)(data);
22
22
  case 'GetTranscriptsForMeetings':
23
- return (0, table_1.formatTranscripts)(data);
23
+ return (0, table_1.formatTranscriptReadResults)(data);
24
24
  case 'SearchTranscripts':
25
25
  return (0, table_1.formatTranscriptSearchResults)(data);
26
26
  case 'SearchCalendarEvents':
@@ -3,12 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.formatEmails = exports.formatSupportArticles = exports.formatDomains = exports.formatProfiles = exports.formatCalendarEvents = exports.formatTranscriptSearchResults = exports.formatTranscripts = exports.formatMeetingDetails = exports.formatMeetingsList = void 0;
6
+ exports.formatEmails = exports.formatSupportArticles = exports.formatDomains = exports.formatProfiles = exports.formatCalendarEvents = exports.formatTranscriptReadResults = exports.formatTranscriptSearchResults = exports.formatMeetingDetails = exports.formatMeetingsList = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const cli_table3_1 = __importDefault(require("cli-table3"));
9
9
  const date_1 = require("./date");
10
10
  const string_1 = require("./string");
11
11
  const style_1 = require("./style");
12
+ const lodash_1 = require("lodash");
12
13
  const idColumnWidth = (ids) => {
13
14
  const maxLength = ids.reduce((max, id) => Math.max(max, String(id).length), 2);
14
15
  return maxLength + 2;
@@ -73,7 +74,7 @@ const formatMeetingDetails = (meetings) => {
73
74
  `${chalk_1.default.bold('ID:')} ${meeting.id}`,
74
75
  `${chalk_1.default.bold('Date:')} ${(0, date_1.formatDate)(meeting.createdAt)}`,
75
76
  meeting.duration
76
- ? `${chalk_1.default.bold('Duration:')} ${Math.round(meeting.duration / 60)} min`
77
+ ? `${chalk_1.default.bold('Duration:')} ${(0, lodash_1.round)(meeting.duration / 60)} min`
77
78
  : null,
78
79
  `${chalk_1.default.bold('Attendees:')}\n${(meeting.attendees ?? []).map((attendee) => ` ${formatAttendee(attendee)}`).join('\n')}`,
79
80
  (meeting.tags ?? []).length > 0
@@ -93,20 +94,6 @@ const formatMeetingDetails = (meetings) => {
93
94
  .join('\n\n---\n');
94
95
  };
95
96
  exports.formatMeetingDetails = formatMeetingDetails;
96
- const formatTranscripts = (transcripts) => {
97
- if (transcripts.length === 0)
98
- return chalk_1.default.yellow('No transcripts found.');
99
- return transcripts
100
- .map((transcript) => {
101
- const header = chalk_1.default.bold.cyan(`\n# ${transcript.meetingName} (ID: ${transcript.meetingId})`);
102
- const content = transcript.transcriptChunks
103
- .map((chunk) => chunk.content)
104
- .join('\n');
105
- return `${header}\n${content}`;
106
- })
107
- .join('\n\n---\n');
108
- };
109
- exports.formatTranscripts = formatTranscripts;
110
97
  const formatTranscriptSearchResults = (results) => {
111
98
  if (results.length === 0)
112
99
  return chalk_1.default.yellow('No transcript matches found.');
@@ -123,12 +110,30 @@ const formatTranscriptSearchResults = (results) => {
123
110
  table.push([
124
111
  (0, string_1.truncate)(result.meetingName || 'New meeting', meetingWidth - 2),
125
112
  result.meetingId,
126
- (0, string_1.truncate)(result.content, contentWidth - 2),
113
+ (0, string_1.truncate)(result.text, contentWidth - 2),
127
114
  ]);
128
115
  });
129
116
  return `${chalk_1.default.bold(`${(0, string_1.pluralize)(results.length, 'match', 'matches')} found`)}\n${table.toString()}`;
130
117
  };
131
118
  exports.formatTranscriptSearchResults = formatTranscriptSearchResults;
119
+ const formatTranscriptReadResults = (results) => {
120
+ if (results.length === 0)
121
+ return chalk_1.default.yellow('No transcripts found.');
122
+ return results
123
+ .map((result) => {
124
+ const header = chalk_1.default.bold.cyan(`\n# ${result.meetingName}`);
125
+ const meta = `${chalk_1.default.bold('Meeting ID:')} ${result.meetingId}`;
126
+ const transcriptEntries = result.transcript
127
+ .map((entry) => `${chalk_1.default.dim((0, lodash_1.round)(entry.timestamp, 2))} ${chalk_1.default.bold(entry.speaker ?? 'Unknown')}: ${entry.text}`)
128
+ .join('\n');
129
+ const transcript = transcriptEntries.length > 0
130
+ ? transcriptEntries
131
+ : chalk_1.default.yellow('No transcript content found.');
132
+ return `${header}\n${meta}\n\n${transcript}`;
133
+ })
134
+ .join('\n\n---\n');
135
+ };
136
+ exports.formatTranscriptReadResults = formatTranscriptReadResults;
132
137
  const formatCalendarEvents = (events) => {
133
138
  if (events.length === 0)
134
139
  return chalk_1.default.yellow('No calendar events found.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@circleback/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Circleback CLI. Search and access meetings, emails, calendar events, and more.",
5
5
  "license": "MIT",
6
6
  "author": "Circleback <support@circleback.ai> (https://circleback.ai)",
@@ -37,9 +37,11 @@
37
37
  "dependencies": {
38
38
  "chalk": "^4.1.2",
39
39
  "cli-table3": "^0.6.5",
40
- "commander": "^13.1.0"
40
+ "commander": "^13.1.0",
41
+ "lodash": "^4.17.23"
41
42
  },
42
43
  "devDependencies": {
44
+ "@types/lodash": "^4.17.24",
43
45
  "@types/node": "^22.0.0",
44
46
  "typescript": "5.6.2"
45
47
  }