MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / Ik8

Function Ik8

package/cli.js:1477–1477  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1475
1476${_.join(`
1477
1478`)}`};var wM=y(()=>{F4();Or6();k8();v8();n76();rw();o1();V1();_8();oY();m8();y8();bK();NG();rV();e7();E5();y$();dz();Tz();kO();U1();vH4=O6(n$6(),1),kH4=O6(DH4(),1),GH4=(YL(),Eq(Pi)),Rc_=new Set([".md",".txt",".text",".json",".yaml",".yml",".toml",".xml",".csv",".html",".htm",".css",".scss",".sass",".less",".js",".ts",".tsx",".jsx",".mjs",".cjs",".mts",".cts",".py",".pyi",".pyw",".rb",".erb",".rake",".go",".rs",".java",".kt",".kts",".scala",".c",".cpp",".cc",".cxx",".h",".hpp",".hxx",".cs",".swift",".sh",".bash",".zsh",".fish",".ps1",".bat",".cmd",".env",".ini",".cfg",".conf",".config",".properties",".sql",".graphql",".gql",".proto",".vue",".svelte",".astro",".ejs",".hbs",".pug",".jade",".php",".pl",".pm",".lua",".r",".R",".dart",".ex",".exs",".erl",".hrl",".clj",".cljs",".cljc",".edn",".hs",".lhs",".elm",".ml",".mli",".f",".f90",".f95",".for",".cmake",".make",".makefile",".gradle",".sbt",".rst",".adoc",".asciidoc",".org",".tex",".latex",".lock",".log",".diff",".patch"]);yH=_1(async(q=!1)=>{let K=Date.now();c8("info","memory_files_started");let _=[],z=new Set,Y=ww(),$=q||Y.hasClaudeMdExternalIncludesApproved||!1,A=l$6("Managed");_.push(...await VL(A,"Managed",z,$));let O=Cf8();if(_.push(...await c76({rulesDir:O,type:"Managed",processedPaths:z,includeExternal:$,conditionalRule:!1})),$J("userSettings")){let D=l$6("User");_.push(...await VL(D,"User",z,!0));let f=bf8();_.push(...await c76({rulesDir:f,type:"User",processedPaths:z,includeExternal:!0,conditionalRule:!1}))}let w=[],j=r1(),H=j;while(H!==yc_(H).root)w.push(H),H=Jr6(H);let J=hY(j),M=jH(j),X=J!==null&&M!==null&&zJ(J)!==zJ(M)&&cV(J,M);for(let D of w.reverse()){let f=X&&cV(D,M)&&!cV(D,J);if($J("projectSettings")&&!f){let G=kL(D,"CLAUDE.md");_.push(...await VL(G,"Project",z,$));let Z=kL(D,".claude","CLAUDE.md");_.push(...await VL(Z,"Project",z,$));let T=kL(D,".claude","rules");_.push(...await c76({rulesDir:T,type:"Project",processedPaths:z,includeExternal:$,conditionalRule:!1}))}if($J("localSettings")){let G=kL(D,"CLAUDE.local.md");_.push(...await VL(G,"Local",z,$))}}if(i6(process.env.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD)){let D=NZ();for(let f of D){let G=kL(f,"CLAUDE.md");_.push(...await VL(G,"Project",z,$));let Z=kL(f,".claude","CLAUDE.md");_.push(...await VL(Z,"Project",z,$));let T=kL(f,".claude","rules");_.push(...await c76({rulesDir:T,type:"Project",processedPaths:z,includeExternal:$,conditionalRule:!1}))}}if(l3()){let{info:D}=await _I1(Tf8(),"AutoMem");if(D){let f=zJ(D.path);if(!z.has(f))z.add(f),_.push(D)}}if(GH4.isTeamMemoryEnabled()){let{info:D}=await _I1(GH4.getTeamMemEntrypoint(),"TeamMem");if(D){let f=zJ(D.path);if(!z.has(f))z.add(f),_.push(D)}}let P=_.reduce((D,f)=>D+f.content.length,0);c8("info","memory_files_completed",{duration_ms:Date.now()-K,file_count:_.length,total_content_length:P});let W={};for(let D of _)W[D.type]=(W[D.type]??0)+1;if(!TH4)TH4=!0,d("tengu_claudemd__initial_load",{file_count:_.length,total_content_length:P,user_count:W.User??0,project_count:W.Project??0,local_count:W.Local??0,managed_count:W.Managed??0,automem_count:W.AutoMem??0,...{teammem_count:W.TeamMem??0},duration_ms:Date.now()-K});if(!q){let D=Bc_();if(D!==void 0&&Wr6())for(let f of _){if(!pc_(f.type))continue;let G=f.parent?"include":D;Dr6(f.path,f.type,G,{globs:f.globs,parentFilePath:f.parent})}}return _})});function Ik8(){let q=process.env.CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS;if(i6(q))return!1;if(k_(q))return!0;return N7().includeGitInstructions??!0}var JI1=y(()=>{m8();U1()});function LH4(q){Uc_=q,bO.cache.clear?.(),tw.cache.clear?.()}var MI1=2000,Uc_=null,XI1,tw,bO;var jN=y(()=>{F4();v8();yk6();wM();oY();m8();XK();E5();JI1();E8();XI1=_1(async()=>{let q=Date.now();c8("info","git_status_started");let K=Date.now(),_=await YJ();if(c8("info","git_is_git_check_completed",{duration_ms:Date.now()-K,is_git:_}),!_)return c8("info","git_status_skipped_not_git",{duration_ms:Date.now()-q}),null;try{let z=Date.now(),[Y,$,A,O,w]=await Promise.all([oM(),dT(),a8(L7(),["--no-optional-locks","status","--short"],{preserveOutputOnError:!1}).then(({stdout:H})=>H.trim()),a8(L7(),["--no-optional-locks","log","--oneline","-n","5"],{preserveOutputOnError:!1}).then(({stdout:H})=>H.trim()),a8(L7(),["config","user.name"],{preserveOutputOnError:!1}).then(({stdout:H})=>H.trim())]);c8("info","git_commands_completed",{duration_ms:Date.now()-z,status_length:A.length});let j=A.length>MI1?A.substring(0,MI1)+`
1479... (truncated because it exceeds 2k characters. If you need more information, run "git status" using BashTool)`:A;return c8("info","git_status_completed",{duration_ms:Date.now()-q,truncated:A.length>MI1}),["This is the git status at the start of the conversation. Note that this status is a snapshot in time, and will not update during the conversation.",`Current branch: ${Y}`,`Main branch (you will usually use this for PRs): ${$}`,...w?[`Git user: ${w}`]:[],`Status:
1480${j||"(clean)"}`,`Recent commits:

Callers 2

cli.jsFile · 0.85
PPKFunction · 0.85

Calls 3

i6Function · 0.85
k_Function · 0.85
N7Function · 0.85

Tested by

no test coverage detected