indent 0.1.12__py3-none-any.whl → 0.1.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of indent might be problematic. Click here for more details.
- exponent/__init__.py +2 -2
- exponent/commands/common.py +10 -10
- exponent/commands/run_commands.py +4 -0
- exponent/core/graphql/client.py +5 -3
- exponent/core/remote_execution/client.py +4 -2
- exponent/core/remote_execution/types.py +10 -1
- exponent/utils/version.py +6 -6
- {indent-0.1.12.dist-info → indent-0.1.14.dist-info}/METADATA +1 -1
- {indent-0.1.12.dist-info → indent-0.1.14.dist-info}/RECORD +11 -11
- {indent-0.1.12.dist-info → indent-0.1.14.dist-info}/WHEEL +0 -0
- {indent-0.1.12.dist-info → indent-0.1.14.dist-info}/entry_points.txt +0 -0
exponent/__init__.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.14'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 14)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
exponent/commands/common.py
CHANGED
|
@@ -132,13 +132,13 @@ async def check_inside_git_repo(settings: Settings) -> None:
|
|
|
132
132
|
)
|
|
133
133
|
)
|
|
134
134
|
click.echo(
|
|
135
|
-
"This is a check to make sure you are running
|
|
135
|
+
"This is a check to make sure you are running Indent from the root of your project."
|
|
136
136
|
)
|
|
137
137
|
|
|
138
138
|
click.echo(f"\nCurrent directory: {click.style(os.getcwd(), fg='cyan')}")
|
|
139
139
|
|
|
140
140
|
click.echo("\nRecommendation:")
|
|
141
|
-
click.echo(" Run
|
|
141
|
+
click.echo(" Run Indent from the root directory of your codebase.")
|
|
142
142
|
click.echo("\nExample:")
|
|
143
143
|
click.echo(
|
|
144
144
|
f" If your project is in {click.style('~/my-project', fg='cyan')}, run:"
|
|
@@ -147,7 +147,7 @@ async def check_inside_git_repo(settings: Settings) -> None:
|
|
|
147
147
|
|
|
148
148
|
# Tell the user they can run exponent config --no-git-warning to disable this check
|
|
149
149
|
click.echo(
|
|
150
|
-
f"\nYou can run {click.style('
|
|
150
|
+
f"\nYou can run {click.style('indent config --set-git-warning-disabled', fg='green')} to disable this check."
|
|
151
151
|
)
|
|
152
152
|
|
|
153
153
|
if not click.confirm(
|
|
@@ -165,26 +165,26 @@ def check_running_from_home_directory(require_confirmation: bool = True) -> bool
|
|
|
165
165
|
if os.path.expanduser("~") == os.getcwd():
|
|
166
166
|
click.echo(
|
|
167
167
|
click.style(
|
|
168
|
-
"\nWarning: Running
|
|
168
|
+
"\nWarning: Running Indent from Home Directory",
|
|
169
169
|
fg="yellow",
|
|
170
170
|
bold=True,
|
|
171
171
|
)
|
|
172
172
|
)
|
|
173
173
|
click.echo(
|
|
174
|
-
"Running
|
|
174
|
+
"Running Indent from your home directory can cause unexpected issues."
|
|
175
175
|
)
|
|
176
176
|
click.echo("\nRecommendation:")
|
|
177
|
-
click.echo(" Run
|
|
177
|
+
click.echo(" Run Indent from the root directory of your codebase.")
|
|
178
178
|
click.echo("\nExample:")
|
|
179
179
|
click.echo(
|
|
180
180
|
f" If your project is in {click.style('~/my-project', fg='cyan')}, run:"
|
|
181
181
|
)
|
|
182
|
-
click.echo(f" {click.style('cd ~/my-project &&
|
|
182
|
+
click.echo(f" {click.style('cd ~/my-project && indent run', fg='green')}")
|
|
183
183
|
|
|
184
184
|
if require_confirmation:
|
|
185
185
|
if not click.confirm(
|
|
186
186
|
click.style(
|
|
187
|
-
f"\nDo you want to continue running
|
|
187
|
+
f"\nDo you want to continue running indent from {os.getcwd()}?",
|
|
188
188
|
fg="yellow",
|
|
189
189
|
),
|
|
190
190
|
default=True,
|
|
@@ -214,7 +214,7 @@ def run_until_complete(coro: Coroutine[Any, Any, Any]) -> Any:
|
|
|
214
214
|
except ExponentError as e:
|
|
215
215
|
click.secho(f"Encountered error: {e}", fg="red")
|
|
216
216
|
click.secho(
|
|
217
|
-
"The
|
|
217
|
+
"The Indent team has been notified, "
|
|
218
218
|
"please try again and reach out if the problem persists.",
|
|
219
219
|
fg="yellow",
|
|
220
220
|
)
|
|
@@ -392,7 +392,7 @@ async def set_login_complete(api_key: str, base_api_url: str, base_ws_url: str)
|
|
|
392
392
|
# than the one used in the user's request...
|
|
393
393
|
# This should never happen
|
|
394
394
|
raise HandledExponentError(
|
|
395
|
-
"Invalid API key, login to https://
|
|
395
|
+
"Invalid API key, login to https://indent.com to find your API key."
|
|
396
396
|
)
|
|
397
397
|
|
|
398
398
|
|
|
@@ -97,6 +97,10 @@ def run(
|
|
|
97
97
|
create_chat(api_key, base_api_url, base_ws_url, ChatSource.CLI_RUN)
|
|
98
98
|
)
|
|
99
99
|
|
|
100
|
+
if timeout_seconds is not None and timeout_seconds <= 0:
|
|
101
|
+
click.secho("Error: --timeout-seconds must be a positive integer", fg="red")
|
|
102
|
+
sys.exit(1)
|
|
103
|
+
|
|
100
104
|
if chat_uuid is None:
|
|
101
105
|
sys.exit(1)
|
|
102
106
|
|
exponent/core/graphql/client.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from collections.abc import AsyncGenerator
|
|
2
2
|
from typing import Any
|
|
3
3
|
|
|
4
|
-
from gql import Client, gql
|
|
4
|
+
from gql import Client, GraphQLRequest, gql
|
|
5
5
|
from gql.transport.httpx import HTTPXAsyncTransport
|
|
6
6
|
from gql.transport.websockets import WebsocketsTransport
|
|
7
7
|
|
|
@@ -41,8 +41,10 @@ class GraphQLClient:
|
|
|
41
41
|
execute_timeout=timeout,
|
|
42
42
|
) as session:
|
|
43
43
|
# Execute single query
|
|
44
|
-
query =
|
|
45
|
-
|
|
44
|
+
query = GraphQLRequest(
|
|
45
|
+
query_str, variable_values=vars, operation_name=op_name
|
|
46
|
+
)
|
|
47
|
+
result = await session.execute(query)
|
|
46
48
|
return result
|
|
47
49
|
|
|
48
50
|
async def subscribe(
|
|
@@ -63,10 +63,10 @@ from exponent.core.remote_execution.types import (
|
|
|
63
63
|
CreateChatResponse,
|
|
64
64
|
GitInfo,
|
|
65
65
|
HeartbeatInfo,
|
|
66
|
-
PrReviewWorkflowInput,
|
|
67
66
|
RemoteExecutionResponseType,
|
|
68
67
|
RunWorkflowRequest,
|
|
69
68
|
StreamingCodeExecutionRequest,
|
|
69
|
+
WorkflowInput,
|
|
70
70
|
WorkflowTriggerRequest,
|
|
71
71
|
WorkflowTriggerResponse,
|
|
72
72
|
)
|
|
@@ -182,6 +182,8 @@ class RemoteExecutionClient:
|
|
|
182
182
|
"""Handle an incoming websocket message.
|
|
183
183
|
Returns None to continue processing, or a REMOTE_EXECUTION_CLIENT_EXIT_INFO to exit."""
|
|
184
184
|
|
|
185
|
+
self._last_request_time = time.time()
|
|
186
|
+
|
|
185
187
|
msg_data = json.loads(msg)
|
|
186
188
|
if msg_data["type"] != "request":
|
|
187
189
|
return None
|
|
@@ -544,7 +546,7 @@ class RemoteExecutionClient:
|
|
|
544
546
|
return cast(dict[str, Any], response.json())
|
|
545
547
|
|
|
546
548
|
async def trigger_workflow(
|
|
547
|
-
self, workflow_name: str, workflow_input:
|
|
549
|
+
self, workflow_name: str, workflow_input: WorkflowInput
|
|
548
550
|
) -> WorkflowTriggerResponse:
|
|
549
551
|
response = await self.api_client.post(
|
|
550
552
|
"/api/remote_execution/trigger_workflow",
|
|
@@ -49,9 +49,17 @@ class PrReviewWorkflowInput(BaseModel):
|
|
|
49
49
|
pr_number: int
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
class SlackWorkflowInput(BaseModel):
|
|
53
|
+
channel_id: str
|
|
54
|
+
thread_ts: str
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
WorkflowInput = PrReviewWorkflowInput | SlackWorkflowInput
|
|
58
|
+
|
|
59
|
+
|
|
52
60
|
class WorkflowTriggerRequest(BaseModel):
|
|
53
61
|
workflow_name: str
|
|
54
|
-
workflow_input:
|
|
62
|
+
workflow_input: WorkflowInput
|
|
55
63
|
|
|
56
64
|
|
|
57
65
|
class WorkflowTriggerResponse(BaseModel):
|
|
@@ -516,6 +524,7 @@ class ChatSource(str, Enum):
|
|
|
516
524
|
WEB = "WEB"
|
|
517
525
|
DESKTOP_APP = "DESKTOP_APP"
|
|
518
526
|
VSCODE_EXTENSION = "VSCODE_EXTENSION"
|
|
527
|
+
SLACK_APP = "SLACK_APP"
|
|
519
528
|
|
|
520
529
|
|
|
521
530
|
class CLIConnectedState(BaseModel):
|
exponent/utils/version.py
CHANGED
|
@@ -135,8 +135,8 @@ def _get_upgrade_command_str(version: str) -> str:
|
|
|
135
135
|
|
|
136
136
|
def _new_version_str(current_version: str, new_version: str) -> str:
|
|
137
137
|
return (
|
|
138
|
-
f"\n{click.style('A new
|
|
139
|
-
f"See {click.style('https://docs.
|
|
138
|
+
f"\n{click.style('A new Indent version is available:', fg='cyan')} {new_version} (current: {current_version})\n"
|
|
139
|
+
f"See {click.style('https://docs.indent.com/help_and_resources/troubleshooting#installation-methods', underline=True)} for details.\n"
|
|
140
140
|
)
|
|
141
141
|
|
|
142
142
|
|
|
@@ -196,15 +196,15 @@ def upgrade_exponent(
|
|
|
196
196
|
|
|
197
197
|
if result.returncode != 0:
|
|
198
198
|
click.secho(
|
|
199
|
-
"\nFailed to upgrade
|
|
199
|
+
"\nFailed to upgrade Indent. See https://docs.indent.com/help_and_resources/troubleshooting#installation-methods for help, or reach out to team@indent.com",
|
|
200
200
|
fg="red",
|
|
201
201
|
)
|
|
202
202
|
sys.exit(2)
|
|
203
203
|
|
|
204
|
-
click.secho(f"Successfully upgraded
|
|
204
|
+
click.secho(f"Successfully upgraded Indent to version {new_version}!", fg="green")
|
|
205
205
|
|
|
206
|
-
click.echo("Re-run
|
|
207
|
-
sys.exit(
|
|
206
|
+
click.echo("Re-run indent to use the latest version.")
|
|
207
|
+
sys.exit(0)
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
def _upgrade_thread_worker(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
exponent/__init__.py,sha256=
|
|
1
|
+
exponent/__init__.py,sha256=1asLxKIxr0ym19WewGl0URtkfnEuN7mK8ZckB9dZw6Q,706
|
|
2
2
|
exponent/cli.py,sha256=u3hhZnn5uqVXyNz6wU8j4U5vLJ--pbA-PweHhpvRzY4,3444
|
|
3
3
|
exponent/py.typed,sha256=9XZl5avs8yHp89XP_1Fjtbeg_2rjYorCC9I0k_j-h2c,334
|
|
4
4
|
exponent/commands/cloud_commands.py,sha256=TNSbKnc7VBo7VALj44CqV5tdCACJejEGmtYvc5wjza4,19080
|
|
5
|
-
exponent/commands/common.py,sha256=
|
|
5
|
+
exponent/commands/common.py,sha256=8kp97_MW1KkV0pMqx73l4AJwJ0c-4Q68TRM97afeQ5E,13473
|
|
6
6
|
exponent/commands/config_commands.py,sha256=iVIX7LuoO5QshzZNSrfvw5yPIiLlce8GQSMBEp7-nzw,11415
|
|
7
|
-
exponent/commands/run_commands.py,sha256=
|
|
7
|
+
exponent/commands/run_commands.py,sha256=dQu-nrFw540JoJZ0yBZxYgj9wTk7NTlQnEo_7Pr5q6k,6407
|
|
8
8
|
exponent/commands/settings.py,sha256=UwwwoCgCY5hzAFD9slOBbA9Gr1hNfoyJ2blsFDC6V8w,1559
|
|
9
9
|
exponent/commands/types.py,sha256=iDJL3hdwhO1PrhsJTJBioNYSKo0CWV8Nv-ONcDaWIRs,3670
|
|
10
10
|
exponent/commands/upgrade.py,sha256=JZr0sNazziuLByQHdT8GZb-lDbRG1YpHW8VB94q-r8w,803
|
|
@@ -12,7 +12,7 @@ exponent/commands/utils.py,sha256=Z3eu3mvYwBh7J_hq17lyt7_MwMG8KcsP7AnsCgOnTNc,46
|
|
|
12
12
|
exponent/commands/workflow_commands.py,sha256=eQufFbKrKCZtewyDpuVe_0QcndbxuaIKHfHpHF8-XzI,3602
|
|
13
13
|
exponent/core/config.py,sha256=TNFLUgLnfSocRMVSav_7E4VcaNHXZ_3Mg5Lp1smP46U,5731
|
|
14
14
|
exponent/core/graphql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
exponent/core/graphql/client.py,sha256=
|
|
15
|
+
exponent/core/graphql/client.py,sha256=SRagD3YPyoYZSO1RtfO-OXD7b5dm1NvgoL6CTbN380o,2009
|
|
16
16
|
exponent/core/graphql/get_chats_query.py,sha256=9-2N1VfapXUZB3IFIKw5U_gKdmfyviJp5JSUntB_Yyk,1177
|
|
17
17
|
exponent/core/graphql/github_config_queries.py,sha256=zKRDxF38q73apQcVaEAA_A20FVr3U0ADc5-8Y6Ns5Dw,1260
|
|
18
18
|
exponent/core/graphql/mutations.py,sha256=cAAiSefyamBgy1zJEZ7LNk0rbjwawTPxMyj8eU6yRRI,3502
|
|
@@ -20,7 +20,7 @@ exponent/core/graphql/queries.py,sha256=RYsk8bub0esspqgakilhzX07yJf2652Ey9tBZK1l
|
|
|
20
20
|
exponent/core/graphql/subscriptions.py,sha256=SQngv_nYVNJjiZ_P2k0UcLIu1pzc4vi7q7lhH89NCZM,393
|
|
21
21
|
exponent/core/remote_execution/checkpoints.py,sha256=3QGYMLa8vT7XmxMYTRcGrW8kNGHwRC0AkUfULribJWg,6354
|
|
22
22
|
exponent/core/remote_execution/cli_rpc_types.py,sha256=bmpfZASzzsD_NDIF2Mnym79km2fem8Oc0tSlSC-0EoY,7478
|
|
23
|
-
exponent/core/remote_execution/client.py,sha256=
|
|
23
|
+
exponent/core/remote_execution/client.py,sha256=eeUiWXebJ3WuDjgvBqg0OZk0heUHcBSRM96xnIE0wFE,28942
|
|
24
24
|
exponent/core/remote_execution/code_execution.py,sha256=jYPB_7dJzS9BTPLX9fKQpsFPatwjbXuaFFSxT9tDTfI,2388
|
|
25
25
|
exponent/core/remote_execution/error_info.py,sha256=Rd7OA3ps06qYejPVcOaMBB9AtftP3wqQoOfiILFASnc,1378
|
|
26
26
|
exponent/core/remote_execution/exceptions.py,sha256=eT57lBnBhvh-KJ5lsKWcfgGA5-WisAxhjZx-Z6OupZY,135
|
|
@@ -32,7 +32,7 @@ exponent/core/remote_execution/session.py,sha256=jlQIdeUj0f7uOk3BgzlJtBJ_GyTIjCc
|
|
|
32
32
|
exponent/core/remote_execution/system_context.py,sha256=QY1zY8_fWj3sh-fmLYtewvgxh7uTX4ITIJqlUTDkj6c,648
|
|
33
33
|
exponent/core/remote_execution/tool_execution.py,sha256=ZBDC2RN_l8oCFO8Fc8dkKoLY_0rn-5h394PvWeXqTnI,12972
|
|
34
34
|
exponent/core/remote_execution/truncation.py,sha256=noB6c4eaebqq5ghTlYJkXbe2XY8Bz_GBeh9DazJUrrU,9644
|
|
35
|
-
exponent/core/remote_execution/types.py,sha256=
|
|
35
|
+
exponent/core/remote_execution/types.py,sha256=8caWaHyiD_QXYFkP6gt8Ieyu3ctLVNDvoM0RfN-Zy_s,15006
|
|
36
36
|
exponent/core/remote_execution/utils.py,sha256=6PlBqYJ3OQwZ0dgXiIu3br04a-d-glDeDZpD0XGGPAE,14793
|
|
37
37
|
exponent/core/remote_execution/languages/python_execution.py,sha256=nsX_LsXcUcHhiEHpSTjOTVNd7CxM146al0kw_iQX5OU,7724
|
|
38
38
|
exponent/core/remote_execution/languages/shell_streaming.py,sha256=eEhngdLhiMiDM0KUfLUtj6BdU3ay3G1zJy6dlR2V6nw,7389
|
|
@@ -45,8 +45,8 @@ exponent/core/types/generated/strategy_info.py,sha256=LN6_ykFMszb21Qc3yw77xEKUtd
|
|
|
45
45
|
exponent/migration-docs/login.md,sha256=KIeXy3m2nzSUgw-4PW1XzXfHael1D4Zu93CplLMb3hI,4252
|
|
46
46
|
exponent/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
exponent/utils/colors.py,sha256=HBkqe_ZmhJ9YiL2Fpulqek4KvLS5mwBTY4LQSM5N8SM,2762
|
|
48
|
-
exponent/utils/version.py,sha256=
|
|
49
|
-
indent-0.1.
|
|
50
|
-
indent-0.1.
|
|
51
|
-
indent-0.1.
|
|
52
|
-
indent-0.1.
|
|
48
|
+
exponent/utils/version.py,sha256=utp6uc6x_-diQ8scs0GkLHxFXG1gffAmZL77dWXI9cw,8890
|
|
49
|
+
indent-0.1.14.dist-info/METADATA,sha256=ab2iaWn7PdoS835Lj5nTf6DYV8Q5WRh1z5t4ClE3bGc,1273
|
|
50
|
+
indent-0.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
51
|
+
indent-0.1.14.dist-info/entry_points.txt,sha256=q8q1t1sbl4NULGOR0OV5RmSG4KEjkpEQRU_RUXEGzcs,44
|
|
52
|
+
indent-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|