Skip to content

Commit a5d5ad1

Browse files
CSCSoftwareclaude
andcommitted
feat: Show "What's New" on session start after updates (v1.12.1)
aidex_session compares installed version with last_seen_version in DB. Shows release highlights once per version update, then stores new version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3242cf6 commit a5d5ad1

4 files changed

Lines changed: 53 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to AiDex will be documented in this file.
44

5+
## [1.12.1] - 2026-03-07
6+
7+
### Added
8+
- **Update notifications**: `aidex_session` now shows "What's New" when AiDex was updated since the last session
9+
- Compares installed version with `last_seen_version` stored in project DB
10+
- Shows highlights + changelog link, only once per version update
11+
512
## [1.12.0] - 2026-03-07
613

714
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aidex-mcp",
3-
"version": "1.12.0",
3+
"version": "1.12.1",
44
"mcpName": "io.github.CSCSoftware/aidex",
55
"description": "MCP Server for persistent code indexing. Gives AI assistants (Claude, Gemini, Copilot, Cursor) instant access to your codebase. 50x less context than grep.",
66
"main": "build/index.js",

src/commands/session.ts

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { openDatabase } from '../db/index.js';
1515
import { update } from './update.js';
1616
import { DEFAULT_EXCLUDE, readGitignore, shortHash } from './init.js';
1717
import { validateIndex, noIndexError, withProjectDb } from './shared.js';
18+
import { PRODUCT_VERSION } from '../constants.js';
1819

1920
// ============================================================
2021
// Types
@@ -35,13 +36,20 @@ export interface ChangedFile {
3536
reason: 'modified' | 'deleted' | 'new';
3637
}
3738

39+
export interface UpdateInfo {
40+
previousVersion: string;
41+
currentVersion: string;
42+
highlights: string[];
43+
}
44+
3845
export interface SessionResult {
3946
success: boolean;
4047
isNewSession: boolean;
4148
sessionInfo: SessionInfo;
4249
externalChanges: ChangedFile[];
4350
reindexed: string[];
4451
note: string | null;
52+
updateInfo: UpdateInfo | null;
4553
error?: string;
4654
}
4755

@@ -53,10 +61,21 @@ const KEY_LAST_SESSION_START = 'last_session_start';
5361
const KEY_LAST_SESSION_END = 'last_session_end';
5462
const KEY_CURRENT_SESSION_START = 'current_session_start';
5563
const KEY_SESSION_NOTE = 'session_note';
64+
const KEY_LAST_SEEN_VERSION = 'last_seen_version';
5665

5766
// Session is considered "new" if more than 5 minutes have passed since last activity
5867
const SESSION_TIMEOUT_MS = 5 * 60 * 1000;
5968

69+
// ============================================================
70+
// Release Notes (update with each release)
71+
// ============================================================
72+
73+
const RELEASE_HIGHLIGHTS: string[] = [
74+
'Auto-setup on install — no more manual "aidex setup" needed',
75+
'Comprehensive AI instructions for all 27 tools (decision tree, search modes, examples)',
76+
'Code refactoring: shared utilities, DB transaction fixes, SQL injection fix',
77+
];
78+
6079
// ============================================================
6180
// Implementation
6281
// ============================================================
@@ -71,7 +90,7 @@ export function session(params: SessionParams): SessionResult {
7190

7291
return withProjectDb(
7392
projectPath, false,
74-
(error) => ({ success: false, isNewSession: false, sessionInfo: { lastSessionStart: null, lastSessionEnd: null, currentSessionStart: null }, externalChanges: [], reindexed: [], note: null, error }),
93+
(error) => ({ success: false, isNewSession: false, sessionInfo: { lastSessionStart: null, lastSessionEnd: null, currentSessionStart: null }, externalChanges: [], reindexed: [], note: null, updateInfo: null, error }),
7594
(db, queries) => {
7695
try {
7796
const now = Date.now();
@@ -137,13 +156,28 @@ export function session(params: SessionParams): SessionResult {
137156
// Get session note
138157
const note = db.getMetadata(KEY_SESSION_NOTE);
139158

159+
// Check for version update
160+
let updateInfo: UpdateInfo | null = null;
161+
const lastSeenVersion = db.getMetadata(KEY_LAST_SEEN_VERSION);
162+
if (lastSeenVersion !== PRODUCT_VERSION) {
163+
if (lastSeenVersion) {
164+
updateInfo = {
165+
previousVersion: lastSeenVersion,
166+
currentVersion: PRODUCT_VERSION,
167+
highlights: RELEASE_HIGHLIGHTS,
168+
};
169+
}
170+
db.setMetadata(KEY_LAST_SEEN_VERSION, PRODUCT_VERSION);
171+
}
172+
140173
return {
141174
success: true,
142175
isNewSession,
143176
sessionInfo,
144177
externalChanges,
145178
reindexed,
146179
note,
180+
updateInfo,
147181
};
148182

149183
} catch (error) {
@@ -154,6 +188,7 @@ export function session(params: SessionParams): SessionResult {
154188
externalChanges: [],
155189
reindexed: [],
156190
note: null,
191+
updateInfo: null,
157192
error: error instanceof Error ? error.message : String(error),
158193
};
159194
}

src/server/tools.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,6 +1721,15 @@ function handleSession(args: Record<string, unknown>): { content: Array<{ type:
17211721
message += '\n';
17221722
}
17231723

1724+
// Version update info
1725+
if (result.updateInfo) {
1726+
message += `## 🎉 Updated: v${result.updateInfo.previousVersion} → v${result.updateInfo.currentVersion}\n\n`;
1727+
for (const highlight of result.updateInfo.highlights) {
1728+
message += `- ${highlight}\n`;
1729+
}
1730+
message += `\nFull changelog: https://github.com/CSCSoftware/AiDex/blob/master/CHANGELOG.md\n\n`;
1731+
}
1732+
17241733
// Session note
17251734
if (result.note) {
17261735
message += '## 📝 Session Note\n';

0 commit comments

Comments
 (0)