mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-07 16:41:06 +08:00
feat(workflow): add lightweight interactive planning workflow with in-memory execution and code exploration
- Introduced `lite-plan` command for intelligent task analysis and planning. - Implemented dynamic exploration and clarification phases based on task complexity. - Added support for auto mode and forced exploration flags. - Defined output artifacts and session structure for planning results. - Enhanced execution process with context handoff to `lite-execute`. chore(temp): create temporary memory content and import script - Added `.temp-memory-content.txt` to store session details and execution plan. - Implemented `temp-import-memory.cjs` to handle memory import using core-memory command. - Ensured cleanup of temporary files after execution.
This commit is contained in:
@@ -32,7 +32,8 @@ async function findProcessOnPort(port: number): Promise<string | null> {
|
||||
|
||||
if (proto !== 'TCP') continue;
|
||||
if (!localAddress.endsWith(`:${port}`)) continue;
|
||||
if (!/^\d+$/.test(pidCandidate)) continue;
|
||||
// Reject PID 0 (System Idle Process) and non-numeric PIDs
|
||||
if (!/^[1-9]\d*$/.test(pidCandidate)) continue;
|
||||
|
||||
return pidCandidate; // PID is the last column
|
||||
}
|
||||
@@ -43,7 +44,8 @@ async function findProcessOnPort(port: number): Promise<string | null> {
|
||||
}
|
||||
|
||||
async function getProcessCommandLine(pid: string): Promise<string | null> {
|
||||
if (!/^\d+$/.test(pid)) return null;
|
||||
// Reject PID 0 (System Idle Process) and non-numeric PIDs
|
||||
if (!/^[1-9]\d*$/.test(pid)) return null;
|
||||
|
||||
try {
|
||||
const probeCommand =
|
||||
@@ -78,7 +80,8 @@ function isLikelyViteCommandLine(commandLine: string, port: number): boolean {
|
||||
* @returns {Promise<boolean>} Success status
|
||||
*/
|
||||
async function killProcess(pid: string): Promise<boolean> {
|
||||
if (!/^\d+$/.test(pid)) return false;
|
||||
// Reject PID 0 (System Idle Process) and non-numeric PIDs
|
||||
if (!/^[1-9]\d*$/.test(pid)) return false;
|
||||
|
||||
try {
|
||||
// Prefer taskkill to terminate the entire process tree on Windows (npm/cmd wrappers can orphan children).
|
||||
|
||||
Reference in New Issue
Block a user