standout 0.5.16 → 0.5.17
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/dist/cli.js +6 -6
- package/dist/wrapped/render.js +1 -1
- package/dist/wrapped/tiers.js +1 -1
- package/dist/wrapped-share.d.ts +1 -3
- package/dist/wrapped-share.js +4 -25
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import { SYSTEM_PROMPT } from "./prompt.js";
|
|
|
9
9
|
import { TOOLS, executeTool } from "./tools.js";
|
|
10
10
|
import { renderWrappedAll } from "./wrapped/render.js";
|
|
11
11
|
import { createWrapped } from "./wrapped-client.js";
|
|
12
|
-
import {
|
|
12
|
+
import { openWrapped } from "./wrapped-share.js";
|
|
13
13
|
const MAX_TURNS = 40;
|
|
14
14
|
// The post-wrapped agent chat (interactive profile-building Q&A) is OFF by
|
|
15
15
|
// default so the command runs to completion non-interactively (e.g. invoked
|
|
@@ -105,21 +105,21 @@ async function maybeShareWrapped(wrapped) {
|
|
|
105
105
|
process.stderr.write(` your wrapped: ${wrapped.share_url}\n\n`);
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
const ans = await askLine(chalk.white(" share
|
|
108
|
+
const ans = await askLine(chalk.white(" share your ai wrapped? [Y/n] "));
|
|
109
109
|
process.stderr.write("\n");
|
|
110
110
|
const shared = !ans || ans.toLowerCase() !== "n";
|
|
111
111
|
if (!shared) {
|
|
112
112
|
process.stderr.write(` your wrapped: ${wrapped.share_url}\n\n`);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
process.stderr.write(" opening
|
|
115
|
+
process.stderr.write(" opening your wrapped...\n");
|
|
116
116
|
try {
|
|
117
|
-
await
|
|
117
|
+
await openWrapped(wrapped.share_url);
|
|
118
118
|
await markWrappedShared(wrapped.id);
|
|
119
|
-
process.stderr.write(
|
|
119
|
+
process.stderr.write(` opened: ${wrapped.share_url}\n\n`);
|
|
120
120
|
}
|
|
121
121
|
catch (err) {
|
|
122
|
-
process.stderr.write(` couldn't open browser —
|
|
122
|
+
process.stderr.write(` couldn't open browser — open it manually: ${wrapped.share_url}\n`);
|
|
123
123
|
process.stderr.write(` (${err instanceof Error ? err.message : err})\n\n`);
|
|
124
124
|
}
|
|
125
125
|
}
|
package/dist/wrapped/render.js
CHANGED
|
@@ -985,7 +985,7 @@ async function renderWrappedCards(view, mode) {
|
|
|
985
985
|
}
|
|
986
986
|
// Share prompt
|
|
987
987
|
process.stdout.write("\n");
|
|
988
|
-
const ans = await askLine(chalk.white(" share
|
|
988
|
+
const ans = await askLine(chalk.white(" share your ai wrapped? [Y/n] "));
|
|
989
989
|
process.stdout.write("\n");
|
|
990
990
|
const shared = !ans || ans.toLowerCase() !== "n";
|
|
991
991
|
return { shared, cancelled: false };
|
package/dist/wrapped/tiers.js
CHANGED
package/dist/wrapped-share.d.ts
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function buildTweetText(view: WrappedAggregateView): string;
|
|
3
|
-
export declare function openShareToX(view: WrappedAggregateView): Promise<void>;
|
|
1
|
+
export declare function openWrapped(shareUrl: string): Promise<void>;
|
package/dist/wrapped-share.js
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import open from "open";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export function
|
|
5
|
-
|
|
6
|
-
? `peak ${view.peak_hour.toString().padStart(2, "0")}:00`
|
|
7
|
-
: null;
|
|
8
|
-
const aiLine = view.ai_assisted_pct > 0
|
|
9
|
-
? `${Math.round(view.ai_assisted_pct * 100)}% AI-assisted`
|
|
10
|
-
: null;
|
|
11
|
-
const stack = view.frameworks.length > 0 ? view.frameworks.slice(0, 3).join(" · ") : null;
|
|
12
|
-
const stats = [peakLine, aiLine, stack].filter(Boolean).join(" · ");
|
|
13
|
-
const lines = [
|
|
14
|
-
`just got my @standoutwork wrapped ${PAW}`,
|
|
15
|
-
stats ||
|
|
16
|
-
`${Math.round(view.total_hours)} hours in claude code last 30 days`,
|
|
17
|
-
view.zinger ? `apparently i'm the kind who ${view.zinger}` : null,
|
|
18
|
-
].filter(Boolean);
|
|
19
|
-
return lines.join("\n");
|
|
20
|
-
}
|
|
21
|
-
export async function openShareToX(view) {
|
|
22
|
-
const text = buildTweetText(view);
|
|
23
|
-
const intent = new URL(TWEET_INTENT);
|
|
24
|
-
intent.searchParams.set("text", text);
|
|
25
|
-
intent.searchParams.set("url", view.share_url);
|
|
26
|
-
await open(intent.toString());
|
|
2
|
+
// Open the shareable wrapped page in the browser. The page itself carries the
|
|
3
|
+
// share affordances; we just take the user there.
|
|
4
|
+
export async function openWrapped(shareUrl) {
|
|
5
|
+
await open(shareUrl);
|
|
27
6
|
}
|