0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
Commit graph

8 commits

Author SHA1 Message Date
Ward Peeters
1d7add1de7
chore(husky): use pnpm version from package.json in pre-commit (#18419)
Co-authored-by: Mastra Code (alibaba-token-plan/glm-5.2) <noreply@mastra.ai>
2026-06-24 12:47:15 +02:00
Tyler Barnes
97b974e292
chore: add missing lint-staged configs (#17220)
This fills in missing package-local lint-staged configs so staged files
in those workspaces get formatted/fixed before CI catches import
ordering.

It also switches the Husky hook to Corepack so the hook can resolve the
repo's pnpm version consistently. On my machine, plain `pnpm` was
failing in the hook env and the fallback made the hook silently skip
lint-staged.

Before:

```sh
pnpm --version || exit 0
pnpm lint-staged --quiet
```

After:

```sh
corepack pnpm@10.29.3 --version || exit 0
corepack pnpm@10.29.3 lint-staged --quiet
```

I checked workspace coverage and verified package-local lint-staged runs
cleanly against the branch diff with:

```sh
corepack pnpm@10.29.3 exec lint-staged --diff HEAD --quiet
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

This PR makes sure every package in the repo automatically formats and
fixes staged files before you commit, and it makes the pre-commit hook
run a specific, consistent pnpm version so those fixes actually run
reliably.

## Changes to Pre-Commit Hook

- Updated .husky/pre-commit to run pnpm via Corepack with an explicit
pin: corepack pnpm@10.29.3 --version || exit 0 and corepack pnpm@10.29.3
lint-staged --quiet (replacing plain pnpm). This ensures the hook
resolves the repository's pnpm version consistently and prevents
lint-staged from being skipped in environments where a global pnpm may
be absent or incompatible.

## Workspace Package lint-staged Configs

- Added package-local lint-staged configuration files
(lint-staged.config.js or .mjs) across ~40+ workspace packages and
subpackages.
- Two consistent patterns applied:
- TypeScript/TSX-focused packages: run eslint --fix --max-warnings=0
then prettier --write on *.{ts,tsx}, and run prettier --write on
*.{js,jsx} and *.{json,md,yml,yaml}.
- Prettier-only packages (test-utils and simpler packages): run prettier
--write for *.{ts,tsx,js,jsx,json,md,yml,yaml}.
- These package-local configs ensure staged files within each workspace
are formatted and lint-fixed (including TS import ordering via eslint
--fix) before commit, reducing CI failures and manual formatting fixes.

## Other Notes

- Author verified workspace coverage and confirmed package-local
lint-staged runs cleanly against the branch diff using: corepack
pnpm@10.29.3 exec lint-staged --diff HEAD --quiet.
- Commit message notes an adjustment to align with pnpm 11 in a
follow-up commit (chore: align lint-staged hook with pnpm 11).

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/17220?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-05-28 12:01:09 -07:00
Tyler Barnes
5d6075b445
fix: refine queued follow-up UX in Mastra Code (#14250)
This tightens up Mastra Code's queued follow-up flow while the agent is
still running.

Pressing Enter now sends normally when idle and queues a follow-up when
a run is in progress. Queued messages and slash commands drain in the
same FIFO order they were entered, so the flow is more predictable.
Queued messages also populate into the message history so pressing up
arrow shows the messages you queued.

Before: follow-ups could feel out of sync while a run was still
streaming.
After: queued follow-ups drain one by one in the order they were
entered.

Also fixed slash-command autocomplete ordering so the first visible
matching entry is highlighted first.

<img width="994" height="883" alt="Screenshot 2026-03-12 at 4 12 28 PM"
src="https://github.com/user-attachments/assets/152e7302-bdca-4dd6-a640-05b387ad38ac"
/>
<img width="955" height="663" alt="Screenshot 2026-03-12 at 4 12 03 PM"
src="https://github.com/user-attachments/assets/b0ae5d00-bdba-4f4c-8beb-2010692ed04b"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Messages entered while an agent is running are queued and auto-send
after the run finishes.
* Enter now sends a message or queues a follow-up when the agent is
busy.
* Custom slash commands use a distinct double-slash prefix; autocomplete
picks the first visible match.
  * Status line displays queued message count.

* **Documentation**
* Updated guidance and keyboard shortcuts to reflect Enter/queuing and
double-slash usage.

* **Tests**
* Expanded unit tests covering queueing, slash-command precedence,
autocomplete, and status-line behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mastra Code (openai/gpt-5.4) <noreply@mastra.ai>
2026-03-13 21:49:06 -07:00
Caleb Barnes
706be96213
chore: suppress verbose lint-staged output in pre-commit hook (#13885) 2026-03-05 21:03:58 -08:00
Ward Peeters
5ac8c6d147
refactor: update lint-staged config to run on staged files only (#12204) 2026-01-22 16:43:21 +01:00
Kenny
ea1d1dfb46 feat: remove linting of admin 2024-11-19 11:25:36 +01:00
Taofeeq Oluder
3ecc7cb20d set up husky, eslint and prettier 2024-08-12 12:57:44 +01:00
Taofeeq Oluder
53ace36c4e resolve conflicts 2024-08-12 12:56:35 +01:00