mirror of
https://github.com/sweetwisdom/everything-claude-code-zh.git
synced 2026-03-21 22:10:09 +00:00
feat: v1.1.0 release - session ID tracking, async hooks, new skills
- Add session ID to session filenames (Issue #62) - Add getSessionIdShort() helper for unique per-session tracking - Add async hooks documentation with example - Create iterative-retrieval skill for progressive context refinement - Add continuous-learning-v2 skill with instinct-based learning - Add ecc.tools ecosystem section to README - Update skills list in README All 67 tests passing.
This commit is contained in:
@@ -113,14 +113,35 @@ async function runTests() {
|
||||
// Run the script
|
||||
await runScript(path.join(scriptsDir, 'session-end.js'));
|
||||
|
||||
// Check if session file was created
|
||||
// Check if session file was created (default session ID)
|
||||
// Use local time to match the script's getDateString() function
|
||||
const sessionsDir = path.join(os.homedir(), '.claude', 'sessions');
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
const sessionFile = path.join(sessionsDir, `${today}-session.tmp`);
|
||||
const now = new Date();
|
||||
const today = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
|
||||
const sessionFile = path.join(sessionsDir, `${today}-default-session.tmp`);
|
||||
|
||||
assert.ok(fs.existsSync(sessionFile), 'Session file should exist');
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (await asyncTest('includes session ID in filename', async () => {
|
||||
const testSessionId = 'test-session-abc12345';
|
||||
const expectedShortId = 'abc12345'; // Last 8 chars
|
||||
|
||||
// Run with custom session ID
|
||||
await runScript(path.join(scriptsDir, 'session-end.js'), '', {
|
||||
CLAUDE_SESSION_ID: testSessionId
|
||||
});
|
||||
|
||||
// Check if session file was created with session ID
|
||||
// Use local time to match the script's getDateString() function
|
||||
const sessionsDir = path.join(os.homedir(), '.claude', 'sessions');
|
||||
const now = new Date();
|
||||
const today = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
|
||||
const sessionFile = path.join(sessionsDir, `${today}-${expectedShortId}-session.tmp`);
|
||||
|
||||
assert.ok(fs.existsSync(sessionFile), `Session file should exist: ${sessionFile}`);
|
||||
})) passed++; else failed++;
|
||||
|
||||
// pre-compact.js tests
|
||||
console.log('\npre-compact.js:');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user