You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc: Improve clarity and consistency of interactive prompts (#538)
Interactive prompts throughout the CLI contained inconsistencies in
grammar, formatting, and terminology that could confuse users unfamiliar
with NEAR.
## Changes
### Grammar and style
- Fixed contractions: "I dont know" → "I don't know"
- Standardized conditional phrases: "if you not sure" → "if you're not
sure"
- Unified action verbs: "input" → "enter"
### Token amount formatting
Standardized NEAR token examples across all prompts:
```diff
- (example: 10NEAR or 0.5near or 10000yoctonear)
+ (example: 10 NEAR or 0.5 NEAR or 10000 yoctonear)
```
### Technical terminology
- Capitalized properly: "url" → "URL", "fastnear" → "FastNEAR",
"coingecko" → "CoinGecko"
- Added context: "MPC contract" → "MPC (Multi-Party Computation)
contract"
### File path prompts
Unified disparate phrasings to consistent format:
```diff
- "What is the location of the file to save..."
- "Where to save the implicit account file?"
- "Enter the name of the file to save..."
+ "Enter the file path where to save..."
```
### Simplified verbose prompts
```diff
- "You chose to limit the access key to only sign transactions for a specific contract. Enter the contract account ID:"
+ "Enter the contract account ID that this access key is limited to:"
```
**Files affected:** 27 files across account management, staking,
transactions, contract operations, and signature handling.
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Review texts used in interactive mode</issue_title>
> <issue_description>There are lots of interactive steps that ask some
questions and suggest options like:
>
> !<span
class="error">[image]</span>([https://user-images.githubusercontent.com/304265/120762439-a2f19780-c4ec-11eb-8440-0ad68e5f171b.png](https://user-images.githubusercontent.com/304265/120762439-a2f19780-c4ec-11eb-8440-0ad68e5f171b.png))
>
> We should thoroughly review those to make sure they are clear and
aligned.
>
> If you are not familiar with NEAR, it is even better! Try this
near-cli and report back whenever you stuck and unable to understand
what is going on.</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes#15
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/near/near-cli-rs/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: Vlad Frolov <[email protected]>
let allowance_near_balance:crate::types::near_allowance::NearAllowance =
148
-
CustomType::new("Enter the allowance, a budget this access key can use to pay for transaction fees (example: 10NEAR or 0.5near or 10000yoctonear):")
148
+
CustomType::new("Enter the allowance, a budget this access key can use to pay for transaction fees (example: 10 NEAR or 0.5 NEAR or 10000 yoctonear):")
#[strum(to_string = "Yes, the RPC endpoint requires API key")]
119
+
#[strum(to_string = "Yes, the RPC endpoint requires an API key")]
120
120
Yes,
121
-
#[strum(to_string = "No, the RPC endpoint does not require API key")]
121
+
#[strum(to_string = "No, the RPC endpoint does not require an API key")]
122
122
No,
123
123
}
124
124
let select_choose_input = Select::new(
125
-
"Do you want to input an API key?",
125
+
"Do you want to enter an API key?",
126
126
vec![ConfirmOptions::Yes,ConfirmOptions::No],
127
127
)
128
128
.prompt()?;
129
129
ifletConfirmOptions::Yes = select_choose_input {
130
130
let api_key:crate::types::api_key::ApiKey =
131
-
CustomType::new("Enter an API key").prompt()?;
131
+
CustomType::new("Enter an API key:").prompt()?;
132
132
Ok(Some(api_key))
133
133
}else{
134
134
Ok(None)
@@ -144,7 +144,7 @@ impl AddNetworkConnection {
144
144
to_string = "Yes, and I want to enter the name of the account hosting the program \"linkdrop\""
145
145
)]
146
146
Yes,
147
-
#[strum(to_string = "I dont know")]
147
+
#[strum(to_string = "I don't know")]
148
148
No,
149
149
}
150
150
let select_choose_input = Select::new(
@@ -154,7 +154,7 @@ impl AddNetworkConnection {
154
154
.prompt()?;
155
155
ifletConfirmOptions::Yes = select_choose_input {
156
156
let account_id:crate::types::account_id::AccountId =
157
-
CustomType::new("What is the name of the account that hosts the \"linkdrop\" program? (e.g. on mainnet it is near, and on testnet it is testnet)").prompt()?;
157
+
CustomType::new("What is the name of the account that hosts the linkdrop program? (e.g. on mainnet it is 'near', on testnet it is 'testnet')").prompt()?;
158
158
Ok(Some(account_id))
159
159
}else{
160
160
Ok(None)
@@ -180,7 +180,7 @@ impl AddNetworkConnection {
180
180
.prompt()?;
181
181
ifletConfirmOptions::Yes = select_choose_input {
182
182
let account_id:crate::types::account_id::AccountId =
183
-
CustomType::new("What is the name of the NEAR Social DB contract account ID (e.g. on mainnet it is social.near)").prompt()?;
183
+
CustomType::new("What is the NEAR Social DB contract account ID? (e.g. on mainnet it is 'social.near')").prompt()?;
184
184
Ok(Some(account_id))
185
185
}else{
186
186
Ok(None)
@@ -204,7 +204,7 @@ impl AddNetworkConnection {
204
204
.prompt()?;
205
205
ifletConfirmOptions::Yes = select_choose_input {
206
206
let faucet_url:crate::types::url::Url =
207
-
CustomType::new("What is the faucet url?").prompt()?;
207
+
CustomType::new("What is the faucet URL?").prompt()?;
208
208
Ok(Some(faucet_url))
209
209
}else{
210
210
Ok(None)
@@ -228,7 +228,7 @@ impl AddNetworkConnection {
228
228
.prompt()?;
229
229
ifletConfirmOptions::Yes = select_choose_input {
230
230
let meta_transaction_relayer_url:crate::types::url::Url =
231
-
CustomType::new("What is the relayer url?").prompt()?;
231
+
CustomType::new("What is the meta transaction relayer URL?").prompt()?;
/// Enter the attached amount to be deposited and then staked into the predecessor's internal account (example: 10NEAR or 0.5near or 10000yoctonear):
5
+
/// Enter the attached amount to be deposited and then staked into the predecessor's internal account (example: 10 NEAR or 0.5 NEAR or 10000 yoctonear):
0 commit comments