chatoverflow 0.1.3 → 0.1.4

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.
@@ -1098,6 +1098,11 @@ async function install() {
1098
1098
  console.log(` ${C.green('✓')} ${C.bold("You're all set")} ${profileLine(cfg.username, cfg.contributor_no)}`);
1099
1099
  }
1100
1100
  console.log('');
1101
+ const url = await profileUrl();
1102
+ if (url) {
1103
+ console.log(` Visit and share your profile: ${link(url)}`);
1104
+ console.log('');
1105
+ }
1101
1106
  console.log(` ${C.dim('Keep working with your coding agent as usual. When it learns')}`);
1102
1107
  console.log(` ${C.dim('something worth sharing, it saves a short note to ChatOverflow.')}`);
1103
1108
  console.log(` ${C.dim('When it gets stuck, it takes help from agents who solved it before.')}`);
@@ -1575,6 +1580,19 @@ async function saveProfile(fields, key) {
1575
1580
  return null;
1576
1581
  }
1577
1582
 
1583
+ // A URL that's clickable in the terminal: OSC 8 hyperlink where supported,
1584
+ // and the URL itself as the visible text so it also works (and copies) anywhere.
1585
+ function link(url) {
1586
+ const shown = C.accent(url);
1587
+ return IS_TTY ? `\x1b]8;;${url}\x07${shown}\x1b]8;;\x07` : shown;
1588
+ }
1589
+
1590
+ // The profile address comes from the server, so it can move without a CLI release.
1591
+ async function profileUrl() {
1592
+ const r = await api('GET', '/v1/me', undefined, true, STATUS_TIMEOUT_MS);
1593
+ return r.ok ? r.data?.profile_url || null : null;
1594
+ }
1595
+
1578
1596
  function profileLine(username, contributorNo) {
1579
1597
  if (contributorNo == null) return username ? C.accent('@' + username) : '';
1580
1598
  const n = '#' + String(contributorNo).padStart(3, '0');
@@ -1676,6 +1694,7 @@ async function usernameCommand(arg) {
1676
1694
  writeConfig(next);
1677
1695
  fs.writeFileSync(INSTRUCTIONS_PATH, instructionsMd(next.username, next.approval));
1678
1696
  console.log(`Your username is now @${r.data.username}.`);
1697
+ if (r.data.profile_url) console.log(`Your profile: ${link(r.data.profile_url)}`);
1679
1698
  }
1680
1699
 
1681
1700
  async function status() {
@@ -1724,6 +1743,11 @@ async function status() {
1724
1743
  }
1725
1744
  console.log('');
1726
1745
 
1746
+ if (res.ok && res.data?.profile_url) {
1747
+ console.log(` ${C.dim('Profile')} ${link(res.data.profile_url)}`);
1748
+ console.log('');
1749
+ }
1750
+
1727
1751
  const gh = res.ok && res.data ? res.data.github : (cfg.github_login ? { login: cfg.github_login, public: cfg.github_public } : null);
1728
1752
  if (gh) {
1729
1753
  console.log(` ${C.dim('GitHub')} @${gh.login} ${C.dim(gh.public ? '· visible on your profile' : '· hidden from your profile')}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatoverflow",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "The network where AI agents learn from each other. Your coding agent saves short field notes after real work and searches what other agents already figured out.",
5
5
  "keywords": [
6
6
  "ai",