gm-codex 2.0.28 → 2.0.30
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/hooks/session-start-hook.js +6 -4
- package/package.json +1 -1
- package/plugin.json +1 -1
|
@@ -4,8 +4,8 @@ const fs = require('fs');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { execSync } = require('child_process');
|
|
6
6
|
|
|
7
|
-
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || process.env.GEMINI_PROJECT_DIR || process.env.OC_PLUGIN_ROOT;
|
|
8
|
-
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.env.GEMINI_PROJECT_DIR || process.env.OC_PROJECT_DIR;
|
|
7
|
+
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || process.env.GEMINI_PROJECT_DIR || process.env.OC_PLUGIN_ROOT || process.env.KILO_PLUGIN_ROOT;
|
|
8
|
+
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.env.GEMINI_PROJECT_DIR || process.env.OC_PROJECT_DIR || process.env.KILO_PROJECT_DIR;
|
|
9
9
|
|
|
10
10
|
const ensureGitignore = () => {
|
|
11
11
|
if (!projectDir) return;
|
|
@@ -113,13 +113,14 @@ When exploring unfamiliar code, finding similar patterns, understanding integrat
|
|
|
113
113
|
|
|
114
114
|
const isGemini = process.env.GEMINI_PROJECT_DIR !== undefined;
|
|
115
115
|
const isOpenCode = process.env.OC_PLUGIN_ROOT !== undefined;
|
|
116
|
+
const isKilo = process.env.KILO_PLUGIN_ROOT !== undefined;
|
|
116
117
|
|
|
117
118
|
if (isGemini) {
|
|
118
119
|
const result = {
|
|
119
120
|
systemMessage: additionalContext
|
|
120
121
|
};
|
|
121
122
|
console.log(JSON.stringify(result, null, 2));
|
|
122
|
-
} else if (isOpenCode) {
|
|
123
|
+
} else if (isOpenCode || isKilo) {
|
|
123
124
|
const result = {
|
|
124
125
|
hookSpecificOutput: {
|
|
125
126
|
hookEventName: 'session.created',
|
|
@@ -139,12 +140,13 @@ When exploring unfamiliar code, finding similar patterns, understanding integrat
|
|
|
139
140
|
} catch (error) {
|
|
140
141
|
const isGemini = process.env.GEMINI_PROJECT_DIR !== undefined;
|
|
141
142
|
const isOpenCode = process.env.OC_PLUGIN_ROOT !== undefined;
|
|
143
|
+
const isKilo = process.env.KILO_PLUGIN_ROOT !== undefined;
|
|
142
144
|
|
|
143
145
|
if (isGemini) {
|
|
144
146
|
console.log(JSON.stringify({
|
|
145
147
|
systemMessage: `Error executing hook: ${error.message}`
|
|
146
148
|
}, null, 2));
|
|
147
|
-
} else if (isOpenCode) {
|
|
149
|
+
} else if (isOpenCode || isKilo) {
|
|
148
150
|
console.log(JSON.stringify({
|
|
149
151
|
hookSpecificOutput: {
|
|
150
152
|
hookEventName: 'session.created',
|
package/package.json
CHANGED