@oh-my-pi/pi-coding-agent 3.35.0 → 3.37.0

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.
@@ -70,8 +70,7 @@ export class OAuthSelectorComponent extends Container {
70
70
  const isAvailable = provider.available;
71
71
 
72
72
  // Check if user is logged in for this provider
73
- const credentials = this.authStorage.get(provider.id);
74
- const isLoggedIn = credentials?.type === "oauth";
73
+ const isLoggedIn = this.authStorage.hasOAuth(provider.id);
75
74
  const statusIndicator = isLoggedIn ? theme.fg("success", ` ${theme.status.success} logged in`) : "";
76
75
 
77
76
  let line = "";
@@ -1157,7 +1157,7 @@ export class InteractiveMode {
1157
1157
  if (!hasUserMessages && !this.sessionManager.getSessionTitle()) {
1158
1158
  const registry = this.session.modelRegistry;
1159
1159
  const smolModel = this.settingsManager.getModelRole("smol");
1160
- generateSessionTitle(text, registry, smolModel)
1160
+ generateSessionTitle(text, registry, smolModel, this.session.sessionId)
1161
1161
  .then(async (title) => {
1162
1162
  if (title) {
1163
1163
  await this.sessionManager.setSessionTitle(title);
@@ -1484,11 +1484,14 @@ export class InteractiveMode {
1484
1484
  }
1485
1485
 
1486
1486
  private sendCompletionNotification(): void {
1487
+ if (this.isBackgrounded === false) return;
1487
1488
  if (isNotificationSuppressed()) return;
1488
1489
  const method = this.settingsManager.getNotificationOnComplete();
1489
1490
  if (method === "off") return;
1490
1491
  const protocol = method === "auto" ? detectNotificationProtocol() : method;
1491
- sendNotification(protocol, "Agent complete");
1492
+ const title = this.sessionManager.getSessionTitle();
1493
+ const message = title ? `${title}: Complete` : "Complete";
1494
+ sendNotification(protocol, message);
1492
1495
  }
1493
1496
 
1494
1497
  /** Extract text content from a user message */
@@ -2610,9 +2613,7 @@ export class InteractiveMode {
2610
2613
  private async showOAuthSelector(mode: "login" | "logout"): Promise<void> {
2611
2614
  if (mode === "logout") {
2612
2615
  const providers = this.session.modelRegistry.authStorage.list();
2613
- const loggedInProviders = providers.filter(
2614
- (p) => this.session.modelRegistry.authStorage.get(p)?.type === "oauth",
2615
- );
2616
+ const loggedInProviders = providers.filter((p) => this.session.modelRegistry.authStorage.hasOAuth(p));
2616
2617
  if (loggedInProviders.length === 0) {
2617
2618
  this.showStatus("No OAuth providers logged in. Use /login first.");
2618
2619
  return;
@@ -2633,6 +2634,7 @@ export class InteractiveMode {
2633
2634
  await this.session.modelRegistry.authStorage.login(providerId as OAuthProvider, {
2634
2635
  onAuth: (info: { url: string; instructions?: string }) => {
2635
2636
  this.chatContainer.addChild(new Spacer(1));
2637
+ this.chatContainer.addChild(new Text(theme.fg("dim", info.url), 1, 0));
2636
2638
  // Use OSC 8 hyperlink escape sequence for clickable link
2637
2639
  const hyperlink = `\x1b]8;;${info.url}\x07Click here to login\x1b]8;;\x07`;
2638
2640
  this.chatContainer.addChild(new Text(theme.fg("accent", hyperlink), 1, 0));
@@ -8,11 +8,6 @@ Use this tool to:
8
8
  - Request user preferences (styling, naming conventions, architecture patterns)
9
9
  - Offer meaningful choices about task direction
10
10
 
11
- Do NOT use for:
12
- - Questions resolvable by reading files or docs
13
- - Permission for normal dev tasks (just proceed)
14
- - Decisions you should make from codebase context
15
-
16
11
  Tips:
17
12
  - Place recommended option first with " (Recommended)" suffix
18
13
  - 2-5 concise, distinct options
@@ -22,3 +17,14 @@ Tips:
22
17
  question: "Which authentication method should this API use?"
23
18
  options: [{"label": "JWT (Recommended)"}, {"label": "OAuth2"}, {"label": "Session cookies"}]
24
19
  </example>
20
+
21
+ ## Critical: Resolve before asking
22
+
23
+ **Exhaust all other options before asking.** Questions interrupt user flow.
24
+
25
+ 1. **Unknown file location?** → Search with grep/find first. Only ask if search fails.
26
+ 2. **Ambiguous syntax/format?** → Infer from context and codebase conventions. Make a reasonable choice.
27
+ 3. **Missing details?** → Check docs, related files, commit history. Fill gaps yourself.
28
+ 4. **Implementation approach?** → Choose based on codebase patterns. Ask only for genuinely novel architectural decisions.
29
+
30
+ If you can make a reasonable inference from the user's request, **do it**. Users communicate intent, not specifications—your job is to translate intent into correct implementation.
@@ -13,6 +13,7 @@ Do NOT use Bash for:
13
13
 
14
14
  ## Command structure
15
15
 
16
+ - Use `workdir` parameter to run commands in a specific directory instead of `cd dir && ...`
16
17
  - Paths with spaces must use double quotes: `cd "/path/with spaces"`
17
18
  - For sequential dependent operations, chain with `&&`: `mkdir foo && cd foo && touch bar`
18
19
  - For parallel independent operations, make multiple tool calls in one message
@@ -0,0 +1,8 @@
1
+ Basic calculations.
2
+
3
+ Input:
4
+ - calculations: array of { expression: string, prefix: string, suffix: string }
5
+
6
+ Notes:
7
+ - Supports +, -, *, /, %, ** and parentheses.
8
+ - Supports decimal, hex (0x), binary (0b), and octal (0o) literals.