@aigencydev/cli 0.3.5 → 0.3.6

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.
@@ -8,45 +8,35 @@ function relativeTime(date) {
8
8
  if (diff < 60_000)
9
9
  return "az önce";
10
10
  if (diff < 3_600_000)
11
- return `${Math.floor(diff / 60_000)} dk önce`;
11
+ return `${Math.floor(diff / 60_000)}dk önce`;
12
12
  if (diff < 86_400_000)
13
- return `${Math.floor(diff / 3_600_000)} saat önce`;
13
+ return `${Math.floor(diff / 3_600_000)}sa önce`;
14
14
  if (diff < 7 * 86_400_000)
15
- return `${Math.floor(diff / 86_400_000)} gün önce`;
15
+ return `${Math.floor(diff / 86_400_000)}g önce`;
16
16
  return date.toLocaleDateString("tr-TR");
17
17
  }
18
- async function buildActivityPreview(sessionId, cwd) {
19
- try {
20
- const events = await readSessionTranscript(sessionId, cwd);
21
- const firstUser = events.find((e) => e.type === "user");
22
- if (firstUser && firstUser.type === "user") {
23
- const clean = firstUser.content.replace(/\s+/g, " ").trim();
24
- return clean.slice(0, 56) + (clean.length > 56 ? "…" : "");
25
- }
26
- }
27
- catch {
28
- }
29
- return "(geçmiş oturum)";
30
- }
31
18
  export function WelcomeBox({ userName, userEmail, modelLabel, cwd, cliVersion, projectRoot, }) {
32
- const [recent, setRecent] = useState([]);
19
+ const [recent, setRecent] = useState(null);
33
20
  useEffect(() => {
34
21
  let cancelled = false;
35
22
  (async () => {
36
23
  try {
37
24
  const sessions = await listSessions(projectRoot);
38
- const prior = sessions.slice(1, 4);
39
- const previews = [];
40
- for (const s of prior) {
41
- const preview = await buildActivityPreview(s.sessionId, projectRoot);
42
- previews.push({
25
+ const prior = sessions.slice(1, 2);
26
+ if (prior.length === 0)
27
+ return;
28
+ const s = prior[0];
29
+ const events = await readSessionTranscript(s.sessionId, projectRoot);
30
+ const firstUser = events.find((e) => e.type === "user");
31
+ const preview = firstUser && firstUser.type === "user"
32
+ ? firstUser.content.replace(/\s+/g, " ").trim().slice(0, 48)
33
+ : "önceki oturum";
34
+ if (!cancelled) {
35
+ setRecent({
43
36
  sessionId: s.sessionId,
44
- preview,
45
- whenLabel: relativeTime(s.lastActivityAt),
37
+ text: `${relativeTime(s.lastActivityAt)}: ${preview}${preview.length >= 48 ? "…" : ""}`,
46
38
  });
47
39
  }
48
- if (!cancelled)
49
- setRecent(previews);
50
40
  }
51
41
  catch {
52
42
  }
@@ -56,7 +46,7 @@ export function WelcomeBox({ userName, userEmail, modelLabel, cwd, cliVersion, p
56
46
  };
57
47
  }, [projectRoot]);
58
48
  const projectName = path.basename(cwd) || cwd;
59
- const displayName = userName.trim() || userEmail || "Geliştirici";
49
+ const displayName = userName.trim() || userEmail || "";
60
50
  const tierColor = modelLabel.includes("Max") ? palette.accent : palette.brand;
61
51
  return (React.createElement(Box, { borderStyle: "round", borderColor: palette.brand, flexDirection: "column", paddingX: 1, marginBottom: 1 },
62
52
  React.createElement(Box, null,
@@ -68,49 +58,28 @@ export function WelcomeBox({ userName, userEmail, modelLabel, cwd, cliVersion, p
68
58
  cliVersion),
69
59
  React.createElement(Text, { color: palette.textFaint }, " \u00B7 "),
70
60
  React.createElement(Text, { color: tierColor, bold: true }, modelLabel)),
71
- React.createElement(Box, { marginTop: 1 },
61
+ displayName && (React.createElement(Box, null,
72
62
  React.createElement(Text, { color: palette.accent },
73
63
  symbols.star,
74
64
  " "),
75
- React.createElement(Text, { color: palette.textPrimary, bold: true },
76
- "Ho\u015F geldin",
77
- displayName !== "Geliştirici" ? `, ${displayName}` : "",
78
- "!")),
79
- React.createElement(Box, { marginTop: 1, flexDirection: "column" },
80
- React.createElement(Box, null,
81
- React.createElement(Text, { color: palette.textDim },
82
- symbols.bullet,
83
- " Dizin: "),
84
- React.createElement(Text, { color: palette.textSecondary }, projectName)),
85
- userEmail && (React.createElement(Box, null,
86
- React.createElement(Text, { color: palette.textDim },
87
- symbols.bullet,
88
- " Hesap: "),
89
- React.createElement(Text, { color: palette.textMuted }, userEmail)))),
90
- React.createElement(Box, { marginTop: 1, flexDirection: "column" },
91
- React.createElement(Text, { color: palette.accent, bold: true },
92
- symbols.lightning,
93
- " Ba\u015Flang\u0131\u00E7 ipu\u00E7lar\u0131"),
94
- React.createElement(Box, { marginTop: 0 },
95
- React.createElement(Text, { color: palette.brand }, " /init"),
96
- React.createElement(Text, { color: palette.textMuted }, " \u2014 proje i\u00E7in AIGENCY.md olu\u015Ftur")),
97
- React.createElement(Box, null,
98
- React.createElement(Text, { color: palette.brand }, " /help"),
99
- React.createElement(Text, { color: palette.textMuted }, " \u2014 komut listesi")),
100
- React.createElement(Box, null,
101
- React.createElement(Text, { color: palette.brand }, " Shift+Tab"),
102
- React.createElement(Text, { color: palette.textMuted }, " \u2014 izin modu de\u011Fi\u015Ftir")),
103
- React.createElement(Box, null,
104
- React.createElement(Text, { color: palette.brand }, " ESC"),
105
- React.createElement(Text, { color: palette.textMuted }, " \u2014 aktif i\u015Flemi iptal et"))),
106
- recent.length > 0 && (React.createElement(Box, { flexDirection: "column", marginTop: 1 },
107
- React.createElement(Text, { color: palette.success, bold: true },
65
+ React.createElement(Text, { color: palette.textPrimary },
66
+ "Ho\u015F geldin, ",
67
+ React.createElement(Text, { bold: true }, displayName)),
68
+ React.createElement(Text, { color: palette.textFaint }, " \u00B7 "),
69
+ React.createElement(Text, { color: palette.textMuted }, projectName))),
70
+ React.createElement(Box, null,
71
+ React.createElement(Text, { color: palette.textFaint },
72
+ symbols.arrow,
73
+ " "),
74
+ React.createElement(Text, { color: palette.brand }, "/help"),
75
+ React.createElement(Text, { color: palette.textFaint }, " yard\u0131m \u00B7 "),
76
+ React.createElement(Text, { color: palette.brand }, "Shift+Tab"),
77
+ React.createElement(Text, { color: palette.textFaint }, " mod \u00B7 "),
78
+ React.createElement(Text, { color: palette.brand }, "ESC"),
79
+ React.createElement(Text, { color: palette.textFaint }, " iptal")),
80
+ recent && (React.createElement(Box, null,
81
+ React.createElement(Text, { color: palette.success },
108
82
  symbols.triangle,
109
- " Son aktiviteler"),
110
- recent.map((r) => (React.createElement(Box, { key: r.sessionId },
111
- React.createElement(Text, { color: palette.textFaint },
112
- " ",
113
- r.whenLabel),
114
- React.createElement(Text, { color: palette.textFaint }, " \u00B7 "),
115
- React.createElement(Text, { color: palette.textSecondary }, r.preview))))))));
83
+ " "),
84
+ React.createElement(Text, { color: palette.textFaint }, recent.text)))));
116
85
  }
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
- export const CLI_VERSION = "0.3.5";
1
+ export const CLI_VERSION = "0.3.6";
2
2
  export const CLI_NAME = "aigency";
3
3
  export const CLI_DISPLAY_NAME = "AIGENCY CLI";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigencydev/cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "AIGENCY CLI — terminalden yapay zeka destekli kod üretimi, dosya yönetimi ve proje otomasyonu.",
5
5
  "type": "module",
6
6
  "bin": {