MCPcopy Create free account
hub / github.com/Louisym/MiniCC / _render_project_context

Method _render_project_context

mini_claude_code/prompt.py:364–382  ·  view source on GitHub ↗

源码: prompt.rs:277-301

(self)

Source from the content-addressed store, hash-verified

362 return "# Environment context\n" + "\n".join(f" - {item}" for item in items)
363
364 def _render_project_context(self) -> str:
365 """源码: prompt.rs:277-301"""
366 ctx = self._project_context
367 bullets = [
368 f"Today's date is {ctx.current_date}.",
369 f"Working directory: {ctx.cwd}",
370 ]
371 if ctx.instruction_files:
372 bullets.append(f"Claude instruction files discovered: {len(ctx.instruction_files)}.")
373 lines = ["# Project context"] + [f" - {b}" for b in bullets]
374 if ctx.git_status:
375 lines.append("")
376 lines.append("Git status snapshot:")
377 lines.append(ctx.git_status)
378 if ctx.git_diff:
379 lines.append("")
380 lines.append("Git diff snapshot:")
381 lines.append(ctx.git_diff)
382 return "\n".join(lines)
383
384 def _render_instruction_files(self) -> str:
385 """源码: prompt.rs:303-324

Callers 1

buildMethod · 0.95

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected