Package com.github.copilot.sdk.json
Class UserPromptSubmittedHookInput
java.lang.Object
com.github.copilot.sdk.json.UserPromptSubmittedHookInput
Input for a user-prompt-submitted hook.
This hook is invoked when the user submits a prompt, allowing you to intercept and modify the prompt before it is processed.
- Since:
- 1.0.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCwd()Gets the current working directory.Gets the user's prompt.longGets the timestamp when the prompt was submitted.Sets the current working directory.Sets the user's prompt.setTimestamp(long timestamp) Sets the timestamp when the prompt was submitted.
-
Constructor Details
-
UserPromptSubmittedHookInput
public UserPromptSubmittedHookInput()
-
-
Method Details
-
getTimestamp
public long getTimestamp()Gets the timestamp when the prompt was submitted.- Returns:
- the timestamp in milliseconds since epoch
-
setTimestamp
Sets the timestamp when the prompt was submitted.- Parameters:
timestamp- the timestamp in milliseconds since epoch- Returns:
- this instance for method chaining
-
getCwd
Gets the current working directory.- Returns:
- the current working directory
-
setCwd
Sets the current working directory.- Parameters:
cwd- the current working directory- Returns:
- this instance for method chaining
-
getPrompt
Gets the user's prompt.- Returns:
- the prompt text
-
setPrompt
Sets the user's prompt.- Parameters:
prompt- the prompt text- Returns:
- this instance for method chaining
-