MCPcopy Index your code
hub / github.com/continuedev/continue / getCommonFields

Function getCommonFields

extensions/cli/src/hooks/fireHook.ts:29–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27const NOOP_RESULT: HookEventResult = { blocked: false, results: [] };
28
29function getCommonFields(): {
30 session_id: string;
31 transcript_path: string;
32 cwd: string;
33 permission_mode?: string;
34} {
35 try {
36 const session = getCurrentSession();
37 const permissionMode = services.toolPermissions?.isReady()
38 ? services.toolPermissions.getState().currentMode
39 : undefined;
40
41 return {
42 session_id: session.sessionId,
43 transcript_path: "", // We don't have a transcript file like Claude Code
44 cwd: process.cwd(),
45 permission_mode: permissionMode,
46 };
47 } catch {
48 return {
49 session_id: "",
50 transcript_path: "",
51 cwd: process.cwd(),
52 };
53 }
54}
55
56function isHookServiceReady(): boolean {
57 try {

Callers 9

firePreToolUseFunction · 0.85
firePostToolUseFunction · 0.85
firePostToolUseFailureFunction · 0.85
fireUserPromptSubmitFunction · 0.85
fireSessionStartFunction · 0.85
fireSessionEndFunction · 0.85
fireStopFunction · 0.85
fireNotificationFunction · 0.85
firePreCompactFunction · 0.85

Calls 3

getCurrentSessionFunction · 0.85
isReadyMethod · 0.45
getStateMethod · 0.45

Tested by

no test coverage detected