MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / createPlanningFileEditorActionEvent

Function createPlanningFileEditorActionEvent

test-utils.tsx:138–168  ·  view source on GitHub ↗
(
  id: string,
)

Source from the content-addressed store, hash-verified

136
137// Helper to create a PlanningFileEditorAction event
138export const createPlanningFileEditorActionEvent = (
139 id: string,
140): ActionEvent => ({
141 id,
142 timestamp: new Date().toISOString(),
143 source: "agent",
144 thought: [{ type: "text", text: "Planning action" }],
145 thinking_blocks: [],
146 action: {
147 kind: "PlanningFileEditorAction",
148 command: "create",
149 path: "/workspace/PLAN.md",
150 file_text: "Plan content",
151 old_str: null,
152 new_str: null,
153 insert_line: null,
154 view_range: null,
155 },
156 tool_name: "planning_file_editor",
157 tool_call_id: "call-1",
158 tool_call: {
159 id: "call-1",
160 type: "function",
161 function: {
162 name: "planning_file_editor",
163 arguments: '{"command": "create"}',
164 },
165 },
166 llm_response_id: "response-1",
167 security_risk: SecurityRisk.UNKNOWN,
168});
169
170// Helper to create a non-planning action event
171export const createOtherActionEvent = (id: string): ActionEvent => ({

Calls

no outgoing calls

Tested by

no test coverage detected