Progress¶
Progress indicators and notifications.
Progress
¶
Represents a progress indicator.
Note: This is a simplified version. For complex progress scenarios, you may want to manage progress updates through custom events.
Create a progress indicator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
VSCodeClient
|
The VS Code client |
required |
progress_id
|
str
|
Unique progress identifier |
required |
Source code in vscode_sockpuppet/progress.py
report
¶
Report progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
Optional[str]
|
Progress message |
None
|
increment
|
Optional[int]
|
Progress increment (percentage) |
None
|
Source code in vscode_sockpuppet/progress.py
ProgressLocation¶
ProgressLocation
¶
Progress location options.
with_progress¶
with_progress
¶
with_progress(client: VSCodeClient, location: str = ProgressLocation.Notification, title: str = '', cancellable: bool = False, message: Optional[str] = None) -> dict
Show a progress indicator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
VSCodeClient
|
The VS Code client |
required |
location
|
str
|
Where to show progress (notification, window, sourcecontrol) |
Notification
|
title
|
str
|
Progress title |
''
|
cancellable
|
bool
|
Whether the operation can be cancelled |
False
|
message
|
Optional[str]
|
Initial progress message |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Result dictionary with success status |
Example
with_progress( ... client, ... location=ProgressLocation.Notification, ... title="Processing", ... message="Please wait..." ... )