Skip to content

ci: update version bump logic for alpha branch & npm publish in CI #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Feb 23, 2025

Conversation

alashchev17
Copy link
Contributor

No description provided.

@alashchev17 alashchev17 self-assigned this Feb 19, 2025
@@ -3,13 +3,13 @@ name: Refact Agent GUI CI build (Node.js)
on:
push:
branches: [main, dev]
paths:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it important?

@@ -25,20 +25,19 @@ jobs:

steps:
- uses: actions/checkout@v3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one too?

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have prettier set up, it automatically changes double quotes for single quotes

cache-dependency-path: refact-agent/gui/package-lock.json

# Disable Husky install during npm ci
- name: Install dependencies
run: |
npm pkg delete scripts.prepare
npm ci

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

path: refact-agent/gui/dist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this file is not changed

description: Publish to NPM Registry
# Automatic trigger for alpha and dev branches
push:
branches: [dev, test/workflow-alpha-version]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/workflow-alpha-version ???

echo "Current version: $VERSION"

# Determine version bump type based on branch
if [[ "${{ github.ref_name }}" == "dev" || "${{ github.ref_name }}" == "test/workflow-alpha-version" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/workflow-alpha-version?

) ||
(
github.event_name == 'pull_request' &&
github.head_ref == 'test/workflow-alpha-version'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/workflow-alpha-version

@reymondzzzz reymondzzzz merged commit 87ea2bc into main Feb 23, 2025
2 checks passed
@reymondzzzz reymondzzzz deleted the test/workflow-alpha-version branch February 23, 2025 06:31
oxyplay pushed a commit that referenced this pull request Feb 24, 2025
* mcp correct shutdown

* now mcp_fetch() works

* CI should work now

* supports env in MCP

* update settings schema for MCP

* make MCP experimental

* remove 1 dep

* chore: better wording

* fix: hotfix for getThreadMode

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* feat: MCP args/envs tables & proper parsing of field type

* feat: validating MCP args/envs & sending them to the LSP on form submit

* fix(mcp envs): store original order of object props while renaming keys might affect ordering

* chore: remove unnecessary comments

* fix: avoid duplicative code & validate for specific RegExp on form change to disable it

* fix: avoid type cast and use type guards instead

* fix(types/regexp): fix type check for CI & regexp

* chore: adjusted typeguard to avoid type casting

* fix: showing 'No content' if file content is undefined

* fix(trim indent): fixed tests

* chore: return undefined instead of void 0

* fix: disable revert checkpoints button if waiting, streaming or not online

* fix: blacklisted dirs excluded from all repos + refactor open shadow repos to only one method

* fix: do not create abs paths if they are not going to be used, speed improvements for checkpoints

* refactor: rename method

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* oleg chore database and mem database

* iter1: vecdb without lance

* iter2: vecdb without lance

* iter3: vecdb without lance debug

* iter3: vecdb without lance debug2

* rm mem-query
add mem-upd
fixed some bugs

* add vec status to the pubsub sse pipeline

* Remove trailing comma in SQL query to fix syntax error

* init: move compression logic into handler

* trajectory save in memdb

* save traj only

* Add trajectory identifier "local-compressed-traj" in chat handler and update compress_trajectory function to accept an optional vector type.

* Remove unused dependencies from Cargo.toml

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Remove redundant protobuf installation steps from workflows and Dockerfile

* Add vdb_emb_aux module for managing embeddings tables

Introduce a new module `vdb_emb_aux` to handle the management of embeddings tables, including creating unique table names and cleaning up old tables based on their creation timestamps. Implement functions to generate table names using workspace folder hashes, parse table timestamps, retrieve all embedding tables, and delete outdated tables asynchronously. Modify existing code to integrate the new module functionality.

* Implement per-workspace embedding tables with auto-cleanup

Refactored the vector database to support multiple embedding tables per workspace:
- Renamed `create_embeddings_table_name` to `create_emb_table_name` for consistency
- Added table name management in VecDBSqlite and MemoriesDatabase
- Implemented automatic cleanup of old embedding tables based on age and count
- Added configurable retention policy (7 days, max 10 tables)
- Updated all SQL queries to use workspace-specific table names

* Standardize column data types in SQLite virtual table creation

* Add new parameters to compress_trajectory function calls

Updated function calls in autonomy.rs and compress_trajectory.rs to include two new parameters:
an optional value (None) and a boolean flag (true) to maintain compatibility with updated function signature.

* Enable `serde` feature for `chrono` dependency in Cargo.toml

* - Add memdb sleeping point notification during shutdown
- Fix memdb pubsub polling to respect shutdown flag
- Remove old triggers before migration
- Clean up debug logging and improve error messages
- Fix error display format in subchat network error handling

* force http2 support in axum

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* Add tool preservation in trajectory compression

* wip: getting icons from the binary

* feat: using icons from lsp and using terminal icon for all cmdline/service/mcp integrations

* fix(cloud login): set address url when logging in through cloud (#329)

* feat(telemetry): sending telemetry for agent rollback actions

* 2.0.5-alpha.3

* fix: ask model to write 🧩EDITOR in a new line

* feat(patches and diffs): track patch and diff result to send to the ide. (#332)

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333)

* ui: hide uncommitted changes warning when the info or error callout is one screen. (#334)

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* feat: preview first, then apply & error handling

* chore: fixed types in fixtures & stories

* 2.0.5-alpha.4

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333) (#337)

Conflicts:
	src/components/ChatForm/ChatForm.tsx
	src/features/Chat/Thread/reducer.ts

 Changes to be committed:
	modified:   src/components/ChatForm/ChatForm.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/services/refact/types.ts

* 2.0.5

* Knowledge db (#196)

* wip: thread stream.

* wip(chat-db): add middleware to connect to db and get threads.

* fix(jb images): remove "add image" button from jetbrains. (#211)

* fix(jb images): remove "add image" button from jetbrains.

* fix(jb images): make `images` a configurable feature.

* wip(knowledge): add sub end point.

* wip(knowlage db): handle insert, update and delete operations.

* wip(memories): add a basic ui for rendering memories.

* wip(knowledge): add create, delete and search services.

* wip(knowledge): add url for updating usage.

* wip(knowledge): add the knowledge page to the sidebar.

* wip(knowledge): add a basic form for adding knowledge.

* wip(knowledge form): add back button.

* wip(knowledge): add back in listAll and add a scroll area to memories list.

* wip(knowledge): list all and subscribe

* wip(knowledge): add delete functionality.

* ui(knowledge): change the orientation of the data-list depending on size

* wip(knowledge list): remove properties the user doesn't need to see from the data list.

* ui(knowledge list): remove data list and use `m_goal` as the title and `payload` as content.

* feat(knowledge): add a like button.

* ui(thumb): change like button from tick to thumb.

* refactor(knowledge): remove project, type and origin from add knowledge form

* refactor(knowledge): remove `mem-list` endpoint.

* feat(knowledge): hide behind a feature flag.

* feat(feature menu): add a hidden feature menu.

* wip(knowledge): add the ability to edit knowledge.

* fix(feature menu): only allow the code to be entered when nothing if focused.

* wip(knowledge search): add comments and rough search handler

* feat(knowledge): add quick search and fix features usage

* fix(features): add links to setting for features set in settings.

* chore*knowledge): fix linter warnings

* wip(knowledge): add `mem-upd` handler for updating memroies.

* wip(knowledge): add status to subscription payload.

* wip(knowledge): add vectorisation status information.

* wip(knowledge): animate db button while parsing.

* wip(knowledge): debouce search and cache vecdb status.

* refactor(knowledge): move components to separate files.

* ui(knowledge): add titles to the forms.

* ui(knowledge): add padding to items so the scroll bar isn't over the boarder

* linter: allow log for unsupproted type in knowledge stream.

* fix(knowledge): don't wait for consumeStream to resolve, this allows the stream to hangup.

* fix: refetch button if counter state is disaligned on frontend with inference

* fix: user.refetch instead of reset of API state

* fix: updating state of agent usage on refetch of user

* fix: void expression for async refetchUser

* 2.0.3-alpha.25

* 2.0.3

* feat(knowledge): create knowledge from chat.

* wip(knowledge): add a reducer and event listener for the current project name to pass to "/v1/trajectory-save".

* wip(knowledge): export active_project types for vscode.

* fix(knowledge): if the chat is an integration use the project from the integration data.

* wip(knowledge): add a story with a knowledge tool call.

* wip(knowledge): add basic ui for updating knowledge useage.

* fix(knowledge): hang up on unmount.

* wip(knowledge): move subscribe to a thunk so it can hangup requests.

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* 2.0.4-alpha.4

* 2.0.4

* 2.0.5-alpha.0

* Feat: Agent Capabilities (#321)

* feat: better controls for agentic features

* wip(chat-db): add knowledge sub thunk.

* fix: clear memery when make a new request

* wip(knowledge): move search to a thunk.

* Login rework (#320)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(login): add un-themed accordion.

* wip(accordion): light mode style

* wip(accordion): support light and dark mode.

* ui(accordion): use theme colour.

* wip(login): add basic ui for login page.

* ui(login): add padding to the container for the login page.

* wip(login): add msw handlers for story book.

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* wip(email login): add hooks and msw interception for storybook

* ui(login): small ui adjustments.

* wip(login): handle canceling email polling.

* fix(email login): remember to set api key on success.

* wip(login): send setup host event to ide.

* fix(email login redirect): quick fix, will need to look closer at App.tsx routing.

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* wip(login): remove old login pages.

* feat: better controls for agentic features

* test(start enw chat): for some reason stubResizeObserver wasn't being called :/

* wip(login): add provider icons.

* refactor(agent usage): move usage update to getUser hook so email login updates the usage.

* ui(login): add title.

* fix(email message): add missing hooks.

* fix(console.log): remove console log.

* ui(login): fix ui jumping when changing text.

* ui(login): allow all items to be collapsed.

* ui(login): remove text changes because of jumps.

---------

Co-authored-by: alashchev17 <[email protected]>

* refactor: remove old chat-db code.

* fix: preventing user from re-navigation, if history, welcome or chat pages are already in pages history

* Feature: Deepseek Reasoning support (#312)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* feat: THINKING_AGENT mode support for deepseek-reasoning model

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* feat: better controls for agentic features

* feat: showing deepseek reasoner option only for PRO users, placing it in a correct place of all agentic features

* chore: fix component file from merge conflicts

* feat: better wording & hiding agent features if restored thread tool use is not agent

* chore: better semantic name for reasoning switch component

* fix: useGetUser to get user instead of outdated useLogin

* 2.0.5-alpha.1

* ui(knowledge): move like button to bottom of last assistant message.

* fix: cut off for mock data in agent rollback

* 2.0.5-alpha.2

* wip(knowledge): make tool button look nicer.

* wip(knowledge): add spacing around tool content.

* wip(knowledge): add msw handler for updating usage.

---------

Co-authored-by: alashchev17 <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>

* 2.0.5-alpha.5

* 2.0.6-alpha.0

* fix(package-lock): fix merge conflicts.

* fix(package-lock): merge conflicts.

* fix(vscode): `Cannot find module 'redux-persist/es/persistReducer' or its corresponding type declarations` this shouldn't be exported. (#339)

* 2.0.6-alpha.1

* fix: support for new textdoc tools from LSP

* fix: include text_edit tool to list of all patch-like tools

* chore: removed duplicate hot keys option in main dropdown

* fix: make reasoner switch available for FREE tier users

* chore: reasoning listed if user is on FREE tier

* fix: unnecesary lock maintained for long time

* add validation for parameters of integration

* 2.0.6

* chore: bump version to 2.0.7-alpha.1

* fix: filtered out o3-mini from models list

* 2.0.7

* hotfix: rollback disabled for thinking

* 0.10.12

* feat: support http get like http post for internal requests

* check if confirmation needed works inside container

* ask list of tools from remote

* fix: proper filter out tools

* fix: proper path escapes and linux-like container path handling even while on windows

* fix: use shell quote instead of \", add secrets yaml and not just variables, and fix url from file path

* refactor: methtod to copy to container with shell escape and fix with url from file in windows

* init implementation of blocklist mechanism

* additional_indexing_dirs and fixes

* _ls_files_under_version_control_recursive for additional indexing dirs, added blacklist check for dirs without vcs

* WorkspaceIndexingSettings -> GlobalIndexingSettings + return on shut down

* rename

* default indexing yaml

* move to glob from directory name matching

* rename, move things around, rewrite comments

* more renames

* more renames, "how it works" in comments

* almost works, now pattern matching is wrong

* additional_indexing_dirs works

* make DEFAULT_BLOCKLIST_DIRS a base to add to

* refactor: indexing for path taking ref not pathbuf

* make ignore rules appropiate based on blocklist settings

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* fix: unnecesary lock maintained for long time

* TODO in blocklist

* feat: updating integration availability values on switch click from general integrations view page

* feat: error handling & better styling & better code structure

* fix: handling form fields change in better way

* Refactor patch tool to apply_tickets and update related modules

- Rename `tool_patch` to `tool_apply_tickets` for clarity.
- Update functions and variables to use the new module name.
- Change ticket actions from `REWRITE_ONE_SYMBOL` to `REPLACE_SYMBOL`, `REWRITE_WHOLE_FILE` to `REPLACE_FILE`, `PARTIAL_EDIT` to `SECTION_EDIT`.
- Adjust related documentation, tests, and configuration for consistency with new naming conventions.
- Remove unused `locate_as` feature and refactor dependencies accordingly.

* Refactor apply_tickets tool to handle single ticket at a time

Simplified the ticket application workflow by processing one ticket at a time instead of batches. Changes include:
- Renamed tool from `apply_tickets` to `apply_ticket` to reflect single-ticket focus
- Updated API endpoint to accept single `ticket_id` instead of array
- Refactored ticket validation and processing to handle individual tickets
- Updated tool description and usage messages throughout codebase
- Renamed related modules and updated imports

* Rename tool from `apply_ticket` to `apply_edit` for better clarity

* Remove redundant word "any" from project change proposal step in YAML config

* Add handling for PatchAction::DeleteFile in tool_apply_edit.rs

Implement `PatchAction::DeleteFile` to support file removal within the `tool_apply_edit.rs`, ensuring consistent handling of file operations.

* Replace legacy `patch()` with `apply_edit()` and `REPLACE_FILE` with `s` to align with current tool syntax standards in the customization configuration file.

* Replace apply_edit tool with text_edit for file manipulation

Introduces a new text_edit tool that provides direct file manipulation capabilities with two commands:
- `create`: Creates new files with specified content
- `str_replace`: Performs exact string replacements in existing files

The tool includes improved error handling and validation, replacing the previous pin-based editing approach. Updated customization_compiled_in.yaml to reflect the new editing workflow.

* Add `file_replace` command and improve text edit tool feedback

- Added new `file_replace` command alongside existing `create` and `str_replace` commands
- Enhanced text edit tool to return diff chunks instead of simple confirmation message
- Modified command execution to return before/after text content for diff generation
- Updated parameter descriptions in tools documentation
- Fixed scratchpad module to use correct tool name 'apply_edit' instead of 'patch'

* 1. Add `replace_multiple` parameter to text_edit tool to allow replacing multiple occurrences of a string at once
2. Enhance logging in restream.rs by showing full value string instead of truncated version
3. Update text_edit tool description to be more concise and mark it as non-agentic
4. Simplify customization instructions by removing unnecessary prompts and clarifying tool usage

* Normalize line endings during string replacement operations

* Add unit tests for text_edit tool and update usage guidelines

* Update terms for ticket descriptions and coding actions

* Enhance file_manager command description with guidance on str_replace usage

* Refactor and enhance error handling for tool call processing

- Extract a `reply` function to streamline response creation.
- Replace `yield` log with more informative log entries.
- Introduce `_replace_broken_tool_call_messages` to handle invalid tool calls.
- Adjust function names for clarity and expand imports for `HashMap`.
- Improve error messaging in `tool_text_edit.rs` to include file content.

* Add AST indexing synchronization to text edit operations

* Refactor text editing tools and update tool descriptions

- Replace `&parameters` with `&my_parameters` in `src/restream.rs` for consistency.
- Add new `aux.rs` utility functions in `src/tools/file/`.
- Introduce modules `tool_create_textdoc.rs`, `tool_replace_textdoc.rs`, and `tool_update_textdoc.rs` in `src/tools/file/`.
- Update `tools_description.rs` definitions for new text document tools: `create_textdoc`, `replace_textdoc`, and `update_textdoc`.
- Remove old `tool_text_edit.rs` and related tests.
- Adapt customization guidelines in `customization_compiled_in.yaml` to use `*_textdoc()` functions.
- Ensure correct paths and imports in `mod.rs` files.

* Add ToolUpdateTextDocRegex for regex-based text replacements

Introduce a new tool, `ToolUpdateTextDocRegex`, to support document updates based on regular expression pattern replacements. This tool enhances the ability to modify text documents by allowing regex-based matches and replacements, enabling more flexible and complex text manipulation.

- Implement `ToolUpdateTextDocRegex` with necessary argument parsing and execution logic.
- Add `str_replace_regex` function to handle regex-based string replacements in files.
- Update `tools_description.rs` to include the new tool specifications.
- Modify `tool_update_textdoc` to use simple string replacements instead of regex.
- Adjust tool descriptions and agentic status for clarity and optimization.
- Ensure tools are properly registered and integrated into the existing framework.

* Remove outdated guidelines for tool calls and adjust temperature constant

* Remove tool_apply_edit and related components

Eliminate the tool_apply_edit code along with associated components, files, and configurations to streamline the codebase without affecting existing functionalities.

* This commit was made almost by agent

Add `rm` and `mv` tools for file manipulation

- Introduce `ToolRm` for deleting files and directories with options for recursion and dry-run.
- Implement `ToolMv` to move or rename files and directories, with a fallback for cross-device moves and an overwrite option.
- Update `tools_description.rs` to include descriptions and parameters for the new tools.
- Declare new modules `tool_rm` and `tool_mv` in `src/tools/mod.rs`.

* Remove deprecated diff and linter modules

Delete `apply_edit`, `diffs`, and `linters` modules from the project as they are no longer used. This includes removing associated imports, unused route definitions, and related code references. Additionally, make minor updates to logging and error handling in affected files.

* Remove test files for patch functionality

Removed test files related to patch functionality including:
- Test cases for rewriting symbols and file editing
- Example toad/frog implementation files used in tests
- Test runner for partial edit functionality
- Supporting test data files with various patch scenarios

* Normalize path handling and update result semantics

- Integrate `to_pathbuf_normalize` function across various files to standardize path normalization.
- Modify the `result` field from `MatchConfirmDenyResult::PASS` to `MatchConfirmDenyResult::CONFIRMATION` to better reflect the operation's intent.

* Remove 📍-notation reference and clean up example file

Removes outdated 📍-notation reference from tool_locate_search.rs and cleans up redundant example message from links.sh test file.

* Refactor file editing tools and simplify diff chunk generation

Reorganized file editing tools under a new `file_edit` module and simplified the diff chunk generation logic:
- Moved file editing tools from `tools/file` to `tools/file_edit` directory
- Simplified diff chunk generation by removing intermediate DiffLine/DiffBlock structs
- Improved error messages for token budget limitations in chat passthrough
- Updated all relevant import paths to reflect the new module structure

* Update tool descriptions and parameter names for clarity

Refine the descriptions of text document editing tools to highlight their specific use cases, ensuring clearer guidance on when to use each tool. Rename parameters in `tool_replace_textdoc.rs` for better accuracy and consistency with the updated tool descriptions.

* Add file edit dry-run feature and refactor tools with dry-run support

- Introduce a new HTTP endpoint `/file_edit_tool_dry_run` to handle dry-run requests for file editing tools.
- Refactor file editing tools (`create_textdoc`, `replace_textdoc`, `update_textdoc`, `update_textdoc_regex`) to support dry-run capability.
- Extract core execution logic into separate functions that accept a `dry` parameter to control whether changes are actually applied or simulated.
- Add `DiffChunk` support across relevant tool execution paths to provide detailed change information for dry-runs.
- Change module visibility for `tool_*` modules in `mod.rs` to public to allow access from the new dry-run feature.

* single-line completion fix (#583)

* Reduce temperature values (initial: 0.2 -> 0.0, no-cache: 0.6 -> 0.5) and remove newline stop token for multiline inputs to improve completion consistency.

* Add new finish reason and improve logging in code completion

Add the "stop-eot" variant to `FinishReason::Stop` mapping in `scratchpad_abstract.rs`. Enhance logging in `code_completion_replace.rs` to issue a warning when a completion is refused due to absence of a code block in the model response, aiding in better debugging and understanding of edge cases.

* Add metadata support check and update handling logic

- Introduce a check for metadata support by calling `is_metadata_supported` in `restream.rs`, affecting the processing flow based on metadata availability.
- Modify `forward_to_openai_endpoint.rs` to rely on `is_metadata_supported` for setting headers instead of conditionally using metadata presence.
- Adjust code completion logic in `code_completion_replace.rs` by trimming cursor line whitespace and updating stop token handling for non-multiline inputs.

* fix: remove '\n' as a stop token in singleline completion

* add comments

---------

Co-authored-by: hamzahasann <[email protected]>

* more readable condition

* pass slice instead of reference to Vec

* collapse else { if cond {} } to else if cond {}

* no need to have 2 copies, we can just move

* pass slice instead of reference to Vec

* reorder to avoid cloning a string
also avoid a completely unnecesary clone of a bool

* reorder to avoid unnecesary clone

* avoid cloning all messages again

* fix: end_str previously was being empty when it shouldn't

* fix: declare line_str before

* delete confusing comment

* readability over performance

* Implement follow-up message generation and topic change detection

- Update the logic for generating follow-up messages and identifying topic changes in conversations.
- Introduce a new struct `FollowUpResponse` to encapsulate follow-ups and topic change status.
- Enhance the `generate_follow_up_message` function to return detailed information using `FollowUpResponse`.
- Modify `_make_conversation` to format conversation history for model input.
- Adjust parameters in `subchat_single` call for improved response handling.
- Update V1 links router to utilize new follow-up message data, reflecting potential new chat suggestions.

* Limit processed chat messages to the last 10 and double token limit in follow-up response generation

* Fix message iteration order in history generation function

Change the iteration order to reverse the entire messages vector first before taking the first 10 entries. This ensures the latest messages are included in the history message display.

* MCP: setup values should arrive now

* MCP session coroutines and stuff

* MCP can shutdown processes

* fix: if threadMode is AGENT or THINKING_AGENT, returning generic AGENT mode for /v1/links request to prevent invalidation

* chore: remove console statement

* git init link impl

* Remove unused imports and comment out unused Git initialization logic

* fix: merge to pathbuf normalize and canonical path

Now it is permissive in windows, and works with strange windows prefixes, any amount of / or \, and long paths, in Unix it still does the same

* test: windows normalization logic

* fix: only import windows necessary types in windows

* fix: absolute paths not touching filesystem works on linux

* fix: replace to pathbuf normalize for canonical path

* Feature: Suggestion popup to open a new chat (#331)

* feat: suggestion UI implemented

* fix: better animation and styling

* feat: getting new_chat_suggestion flag from LSP binary & handling its logic on client side

* fix: updated fixtures for tests and stories

* fix: extracted animation styles logic into css modules

* fix: not allowing LSP to override new_chat_suggested flag from true to false

* chore: delete old SuggestNewChat.tsx

* fix: mention o3-mini as reasoning model in switch

* new qwen25 models with tool usage

* mistral small model with tool use

* fix: show mcp error to the model

* fix: add warning to use npx.cmd and npm.cmd in Windows

* label

* fix(prompt): simplified prompt so gpt-4o-mini can understand correctly if the topic has been changed

* - use shell escape for cmd tool
- remove duplicate filenames in cat tool (ui)

* stronger escape for powershell in cmdtool

* deps

* Create refact.yaml

endpoints for refact selfhost.
docker run -d --rm -p 8008:8008 -v perm-storage:/perm_storage --gpus all smallcloud/refact_self_hosting

* rename to bring_your_own_key/refact_self_hosting.yaml

* move everything to refact-agent/

* move rustfmt.toml

* move everything over to refact-server

* move away .github

* delete integrations.d for now

* move all files to refact-agent/gui

* move rust to engine/

* no "husky install"

* add basic cicd stuff

* disable test

* fix uploading

* quickfix for test13_choredb

* fix double build of server

* fix vecdb and stats in case of insecure https connection, add notes for the future development

* quickfix of stats table

* debug session 1

* less messages

* chore(chaT): sync with changes to alpha, include new patches.

* fix(git ignore): git was ignoring __fixtures__ and __tests__ directories.

* chore(chat): update repository url in package.jsson

* fix(chat)): opening an old chat from history without the newer `suggested_chat` property. (#511)

* Enable reasoning support for models and remove filtering in hook

* Improve error messages in file_edit tools for better clarity

* fix: check if path is absolute for create textdoc before canonicaliza… (#515)

* fix: check if path is absolute for create textdoc before canonicalization

* fix: check for absolute before canonicalize in all text edit tools

* fix: static lsp in predictible path instead of configured, and create docker network if it does not exist

* fix: create network if not exist and get host cache dir

* fix: http request with retries so sync workspace can wait for http server to start

* from manuel: impersonate cosmopolitan to fix static build of sqlite vec

* fix: move dockerignore to engine, since refact-lsp static binary is built from there

* oops. sleep only for debug, not needed now

* feat: allow `globally_allowed_integrations` to be set in integrations.yaml

* fix: include __init__.py

* fix: temp fix for auto generate cdp

* fix: replace async tar with tokio tar to not use different async environments

* fix engine build

* delete rudimental code

* fix: making usage limits for all users (#519)

* fix: making usage limits for all users

* fix: remove unused imports

* fix: hiding upgrade button if not FREE tier & messages adjusted

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* refactor: use git2 status show instead of redundant enum, allow to get diff status of all changes, diff from workdir instead of creating index

* uncommited changes warning message separating unstaged and staged

* remove unused method

* fix: uncommited changes warning, failed integrations links and more should be present also for thinking agent mode

* fix: add usage also for delta collector in streaming in python sdk

* fix: count cache tokens for claude

* fix: increase stream limit

* fix: secrets yaml was not used

* ci(npm publish): better version bump message (#523)

* fix: showing usable models if user's plan is not FREE (#522)

* feat: version bump [email protected] (#525)

* feat: version bump [email protected] (#526)

* feat: version bump [email protected]

* chore: update package-lock.json

---------

Co-authored-by: Oleg Klimov <[email protected]>
Co-authored-by: Dimitry Ageev <[email protected]>
Co-authored-by: V4LER11 <[email protected]>
Co-authored-by: Humberto Yusta <[email protected]>
Co-authored-by: JegernOUTT <[email protected]>
Co-authored-by: Kirill Starkov <[email protected]>
Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: hamzahasann <[email protected]>
Co-authored-by: MDario123 <[email protected]>
Co-authored-by: ukrolelo <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
oxyplay pushed a commit that referenced this pull request Feb 24, 2025
* update settings schema for MCP

* make MCP experimental

* remove 1 dep

* chore: better wording

* fix: hotfix for getThreadMode

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* feat: MCP args/envs tables & proper parsing of field type

* feat: validating MCP args/envs & sending them to the LSP on form submit

* fix(mcp envs): store original order of object props while renaming keys might affect ordering

* chore: remove unnecessary comments

* fix: avoid duplicative code & validate for specific RegExp on form change to disable it

* fix: avoid type cast and use type guards instead

* fix(types/regexp): fix type check for CI & regexp

* chore: adjusted typeguard to avoid type casting

* fix: showing 'No content' if file content is undefined

* fix(trim indent): fixed tests

* chore: return undefined instead of void 0

* fix: disable revert checkpoints button if waiting, streaming or not online

* fix: blacklisted dirs excluded from all repos + refactor open shadow repos to only one method

* fix: do not create abs paths if they are not going to be used, speed improvements for checkpoints

* refactor: rename method

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* oleg chore database and mem database

* iter1: vecdb without lance

* iter2: vecdb without lance

* iter3: vecdb without lance debug

* iter3: vecdb without lance debug2

* rm mem-query
add mem-upd
fixed some bugs

* add vec status to the pubsub sse pipeline

* Remove trailing comma in SQL query to fix syntax error

* init: move compression logic into handler

* trajectory save in memdb

* save traj only

* Add trajectory identifier "local-compressed-traj" in chat handler and update compress_trajectory function to accept an optional vector type.

* Remove unused dependencies from Cargo.toml

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Remove redundant protobuf installation steps from workflows and Dockerfile

* Add vdb_emb_aux module for managing embeddings tables

Introduce a new module `vdb_emb_aux` to handle the management of embeddings tables, including creating unique table names and cleaning up old tables based on their creation timestamps. Implement functions to generate table names using workspace folder hashes, parse table timestamps, retrieve all embedding tables, and delete outdated tables asynchronously. Modify existing code to integrate the new module functionality.

* Implement per-workspace embedding tables with auto-cleanup

Refactored the vector database to support multiple embedding tables per workspace:
- Renamed `create_embeddings_table_name` to `create_emb_table_name` for consistency
- Added table name management in VecDBSqlite and MemoriesDatabase
- Implemented automatic cleanup of old embedding tables based on age and count
- Added configurable retention policy (7 days, max 10 tables)
- Updated all SQL queries to use workspace-specific table names

* Standardize column data types in SQLite virtual table creation

* Add new parameters to compress_trajectory function calls

Updated function calls in autonomy.rs and compress_trajectory.rs to include two new parameters:
an optional value (None) and a boolean flag (true) to maintain compatibility with updated function signature.

* Enable `serde` feature for `chrono` dependency in Cargo.toml

* - Add memdb sleeping point notification during shutdown
- Fix memdb pubsub polling to respect shutdown flag
- Remove old triggers before migration
- Clean up debug logging and improve error messages
- Fix error display format in subchat network error handling

* force http2 support in axum

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* Add tool preservation in trajectory compression

* wip: getting icons from the binary

* feat: using icons from lsp and using terminal icon for all cmdline/service/mcp integrations

* fix(cloud login): set address url when logging in through cloud (#329)

* feat(telemetry): sending telemetry for agent rollback actions

* 2.0.5-alpha.3

* fix: ask model to write 🧩EDITOR in a new line

* feat(patches and diffs): track patch and diff result to send to the ide. (#332)

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333)

* ui: hide uncommitted changes warning when the info or error callout is one screen. (#334)

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* feat: preview first, then apply & error handling

* chore: fixed types in fixtures & stories

* 2.0.5-alpha.4

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333) (#337)

Conflicts:
	src/components/ChatForm/ChatForm.tsx
	src/features/Chat/Thread/reducer.ts

 Changes to be committed:
	modified:   src/components/ChatForm/ChatForm.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/services/refact/types.ts

* 2.0.5

* Knowledge db (#196)

* wip: thread stream.

* wip(chat-db): add middleware to connect to db and get threads.

* fix(jb images): remove "add image" button from jetbrains. (#211)

* fix(jb images): remove "add image" button from jetbrains.

* fix(jb images): make `images` a configurable feature.

* wip(knowledge): add sub end point.

* wip(knowlage db): handle insert, update and delete operations.

* wip(memories): add a basic ui for rendering memories.

* wip(knowledge): add create, delete and search services.

* wip(knowledge): add url for updating usage.

* wip(knowledge): add the knowledge page to the sidebar.

* wip(knowledge): add a basic form for adding knowledge.

* wip(knowledge form): add back button.

* wip(knowledge): add back in listAll and add a scroll area to memories list.

* wip(knowledge): list all and subscribe

* wip(knowledge): add delete functionality.

* ui(knowledge): change the orientation of the data-list depending on size

* wip(knowledge list): remove properties the user doesn't need to see from the data list.

* ui(knowledge list): remove data list and use `m_goal` as the title and `payload` as content.

* feat(knowledge): add a like button.

* ui(thumb): change like button from tick to thumb.

* refactor(knowledge): remove project, type and origin from add knowledge form

* refactor(knowledge): remove `mem-list` endpoint.

* feat(knowledge): hide behind a feature flag.

* feat(feature menu): add a hidden feature menu.

* wip(knowledge): add the ability to edit knowledge.

* fix(feature menu): only allow the code to be entered when nothing if focused.

* wip(knowledge search): add comments and rough search handler

* feat(knowledge): add quick search and fix features usage

* fix(features): add links to setting for features set in settings.

* chore*knowledge): fix linter warnings

* wip(knowledge): add `mem-upd` handler for updating memroies.

* wip(knowledge): add status to subscription payload.

* wip(knowledge): add vectorisation status information.

* wip(knowledge): animate db button while parsing.

* wip(knowledge): debouce search and cache vecdb status.

* refactor(knowledge): move components to separate files.

* ui(knowledge): add titles to the forms.

* ui(knowledge): add padding to items so the scroll bar isn't over the boarder

* linter: allow log for unsupproted type in knowledge stream.

* fix(knowledge): don't wait for consumeStream to resolve, this allows the stream to hangup.

* fix: refetch button if counter state is disaligned on frontend with inference

* fix: user.refetch instead of reset of API state

* fix: updating state of agent usage on refetch of user

* fix: void expression for async refetchUser

* 2.0.3-alpha.25

* 2.0.3

* feat(knowledge): create knowledge from chat.

* wip(knowledge): add a reducer and event listener for the current project name to pass to "/v1/trajectory-save".

* wip(knowledge): export active_project types for vscode.

* fix(knowledge): if the chat is an integration use the project from the integration data.

* wip(knowledge): add a story with a knowledge tool call.

* wip(knowledge): add basic ui for updating knowledge useage.

* fix(knowledge): hang up on unmount.

* wip(knowledge): move subscribe to a thunk so it can hangup requests.

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* 2.0.4-alpha.4

* 2.0.4

* 2.0.5-alpha.0

* Feat: Agent Capabilities (#321)

* feat: better controls for agentic features

* wip(chat-db): add knowledge sub thunk.

* fix: clear memery when make a new request

* wip(knowledge): move search to a thunk.

* Login rework (#320)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(login): add un-themed accordion.

* wip(accordion): light mode style

* wip(accordion): support light and dark mode.

* ui(accordion): use theme colour.

* wip(login): add basic ui for login page.

* ui(login): add padding to the container for the login page.

* wip(login): add msw handlers for story book.

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* wip(email login): add hooks and msw interception for storybook

* ui(login): small ui adjustments.

* wip(login): handle canceling email polling.

* fix(email login): remember to set api key on success.

* wip(login): send setup host event to ide.

* fix(email login redirect): quick fix, will need to look closer at App.tsx routing.

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* wip(login): remove old login pages.

* feat: better controls for agentic features

* test(start enw chat): for some reason stubResizeObserver wasn't being called :/

* wip(login): add provider icons.

* refactor(agent usage): move usage update to getUser hook so email login updates the usage.

* ui(login): add title.

* fix(email message): add missing hooks.

* fix(console.log): remove console log.

* ui(login): fix ui jumping when changing text.

* ui(login): allow all items to be collapsed.

* ui(login): remove text changes because of jumps.

---------

Co-authored-by: alashchev17 <[email protected]>

* refactor: remove old chat-db code.

* fix: preventing user from re-navigation, if history, welcome or chat pages are already in pages history

* Feature: Deepseek Reasoning support (#312)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* feat: THINKING_AGENT mode support for deepseek-reasoning model

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* feat: better controls for agentic features

* feat: showing deepseek reasoner option only for PRO users, placing it in a correct place of all agentic features

* chore: fix component file from merge conflicts

* feat: better wording & hiding agent features if restored thread tool use is not agent

* chore: better semantic name for reasoning switch component

* fix: useGetUser to get user instead of outdated useLogin

* 2.0.5-alpha.1

* ui(knowledge): move like button to bottom of last assistant message.

* fix: cut off for mock data in agent rollback

* 2.0.5-alpha.2

* wip(knowledge): make tool button look nicer.

* wip(knowledge): add spacing around tool content.

* wip(knowledge): add msw handler for updating usage.

---------

Co-authored-by: alashchev17 <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>

* 2.0.5-alpha.5

* 2.0.6-alpha.0

* fix(package-lock): fix merge conflicts.

* fix(package-lock): merge conflicts.

* fix(vscode): `Cannot find module 'redux-persist/es/persistReducer' or its corresponding type declarations` this shouldn't be exported. (#339)

* 2.0.6-alpha.1

* fix: support for new textdoc tools from LSP

* fix: include text_edit tool to list of all patch-like tools

* chore: removed duplicate hot keys option in main dropdown

* fix: make reasoner switch available for FREE tier users

* chore: reasoning listed if user is on FREE tier

* fix: unnecesary lock maintained for long time

* add validation for parameters of integration

* 2.0.6

* chore: bump version to 2.0.7-alpha.1

* fix: filtered out o3-mini from models list

* 2.0.7

* hotfix: rollback disabled for thinking

* 0.10.12

* feat: support http get like http post for internal requests

* check if confirmation needed works inside container

* ask list of tools from remote

* fix: proper filter out tools

* fix: proper path escapes and linux-like container path handling even while on windows

* fix: use shell quote instead of \", add secrets yaml and not just variables, and fix url from file path

* refactor: methtod to copy to container with shell escape and fix with url from file in windows

* init implementation of blocklist mechanism

* additional_indexing_dirs and fixes

* _ls_files_under_version_control_recursive for additional indexing dirs, added blacklist check for dirs without vcs

* WorkspaceIndexingSettings -> GlobalIndexingSettings + return on shut down

* rename

* default indexing yaml

* move to glob from directory name matching

* rename, move things around, rewrite comments

* more renames

* more renames, "how it works" in comments

* almost works, now pattern matching is wrong

* additional_indexing_dirs works

* make DEFAULT_BLOCKLIST_DIRS a base to add to

* refactor: indexing for path taking ref not pathbuf

* make ignore rules appropiate based on blocklist settings

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* fix: unnecesary lock maintained for long time

* TODO in blocklist

* feat: updating integration availability values on switch click from general integrations view page

* feat: error handling & better styling & better code structure

* fix: handling form fields change in better way

* Refactor patch tool to apply_tickets and update related modules

- Rename `tool_patch` to `tool_apply_tickets` for clarity.
- Update functions and variables to use the new module name.
- Change ticket actions from `REWRITE_ONE_SYMBOL` to `REPLACE_SYMBOL`, `REWRITE_WHOLE_FILE` to `REPLACE_FILE`, `PARTIAL_EDIT` to `SECTION_EDIT`.
- Adjust related documentation, tests, and configuration for consistency with new naming conventions.
- Remove unused `locate_as` feature and refactor dependencies accordingly.

* Refactor apply_tickets tool to handle single ticket at a time

Simplified the ticket application workflow by processing one ticket at a time instead of batches. Changes include:
- Renamed tool from `apply_tickets` to `apply_ticket` to reflect single-ticket focus
- Updated API endpoint to accept single `ticket_id` instead of array
- Refactored ticket validation and processing to handle individual tickets
- Updated tool description and usage messages throughout codebase
- Renamed related modules and updated imports

* Rename tool from `apply_ticket` to `apply_edit` for better clarity

* Remove redundant word "any" from project change proposal step in YAML config

* Add handling for PatchAction::DeleteFile in tool_apply_edit.rs

Implement `PatchAction::DeleteFile` to support file removal within the `tool_apply_edit.rs`, ensuring consistent handling of file operations.

* Replace legacy `patch()` with `apply_edit()` and `REPLACE_FILE` with `s` to align with current tool syntax standards in the customization configuration file.

* Replace apply_edit tool with text_edit for file manipulation

Introduces a new text_edit tool that provides direct file manipulation capabilities with two commands:
- `create`: Creates new files with specified content
- `str_replace`: Performs exact string replacements in existing files

The tool includes improved error handling and validation, replacing the previous pin-based editing approach. Updated customization_compiled_in.yaml to reflect the new editing workflow.

* Add `file_replace` command and improve text edit tool feedback

- Added new `file_replace` command alongside existing `create` and `str_replace` commands
- Enhanced text edit tool to return diff chunks instead of simple confirmation message
- Modified command execution to return before/after text content for diff generation
- Updated parameter descriptions in tools documentation
- Fixed scratchpad module to use correct tool name 'apply_edit' instead of 'patch'

* 1. Add `replace_multiple` parameter to text_edit tool to allow replacing multiple occurrences of a string at once
2. Enhance logging in restream.rs by showing full value string instead of truncated version
3. Update text_edit tool description to be more concise and mark it as non-agentic
4. Simplify customization instructions by removing unnecessary prompts and clarifying tool usage

* Normalize line endings during string replacement operations

* Add unit tests for text_edit tool and update usage guidelines

* Update terms for ticket descriptions and coding actions

* Enhance file_manager command description with guidance on str_replace usage

* Refactor and enhance error handling for tool call processing

- Extract a `reply` function to streamline response creation.
- Replace `yield` log with more informative log entries.
- Introduce `_replace_broken_tool_call_messages` to handle invalid tool calls.
- Adjust function names for clarity and expand imports for `HashMap`.
- Improve error messaging in `tool_text_edit.rs` to include file content.

* Add AST indexing synchronization to text edit operations

* Refactor text editing tools and update tool descriptions

- Replace `&parameters` with `&my_parameters` in `src/restream.rs` for consistency.
- Add new `aux.rs` utility functions in `src/tools/file/`.
- Introduce modules `tool_create_textdoc.rs`, `tool_replace_textdoc.rs`, and `tool_update_textdoc.rs` in `src/tools/file/`.
- Update `tools_description.rs` definitions for new text document tools: `create_textdoc`, `replace_textdoc`, and `update_textdoc`.
- Remove old `tool_text_edit.rs` and related tests.
- Adapt customization guidelines in `customization_compiled_in.yaml` to use `*_textdoc()` functions.
- Ensure correct paths and imports in `mod.rs` files.

* Add ToolUpdateTextDocRegex for regex-based text replacements

Introduce a new tool, `ToolUpdateTextDocRegex`, to support document updates based on regular expression pattern replacements. This tool enhances the ability to modify text documents by allowing regex-based matches and replacements, enabling more flexible and complex text manipulation.

- Implement `ToolUpdateTextDocRegex` with necessary argument parsing and execution logic.
- Add `str_replace_regex` function to handle regex-based string replacements in files.
- Update `tools_description.rs` to include the new tool specifications.
- Modify `tool_update_textdoc` to use simple string replacements instead of regex.
- Adjust tool descriptions and agentic status for clarity and optimization.
- Ensure tools are properly registered and integrated into the existing framework.

* Remove outdated guidelines for tool calls and adjust temperature constant

* Remove tool_apply_edit and related components

Eliminate the tool_apply_edit code along with associated components, files, and configurations to streamline the codebase without affecting existing functionalities.

* This commit was made almost by agent

Add `rm` and `mv` tools for file manipulation

- Introduce `ToolRm` for deleting files and directories with options for recursion and dry-run.
- Implement `ToolMv` to move or rename files and directories, with a fallback for cross-device moves and an overwrite option.
- Update `tools_description.rs` to include descriptions and parameters for the new tools.
- Declare new modules `tool_rm` and `tool_mv` in `src/tools/mod.rs`.

* Remove deprecated diff and linter modules

Delete `apply_edit`, `diffs`, and `linters` modules from the project as they are no longer used. This includes removing associated imports, unused route definitions, and related code references. Additionally, make minor updates to logging and error handling in affected files.

* Remove test files for patch functionality

Removed test files related to patch functionality including:
- Test cases for rewriting symbols and file editing
- Example toad/frog implementation files used in tests
- Test runner for partial edit functionality
- Supporting test data files with various patch scenarios

* Normalize path handling and update result semantics

- Integrate `to_pathbuf_normalize` function across various files to standardize path normalization.
- Modify the `result` field from `MatchConfirmDenyResult::PASS` to `MatchConfirmDenyResult::CONFIRMATION` to better reflect the operation's intent.

* Remove 📍-notation reference and clean up example file

Removes outdated 📍-notation reference from tool_locate_search.rs and cleans up redundant example message from links.sh test file.

* Refactor file editing tools and simplify diff chunk generation

Reorganized file editing tools under a new `file_edit` module and simplified the diff chunk generation logic:
- Moved file editing tools from `tools/file` to `tools/file_edit` directory
- Simplified diff chunk generation by removing intermediate DiffLine/DiffBlock structs
- Improved error messages for token budget limitations in chat passthrough
- Updated all relevant import paths to reflect the new module structure

* Update tool descriptions and parameter names for clarity

Refine the descriptions of text document editing tools to highlight their specific use cases, ensuring clearer guidance on when to use each tool. Rename parameters in `tool_replace_textdoc.rs` for better accuracy and consistency with the updated tool descriptions.

* Add file edit dry-run feature and refactor tools with dry-run support

- Introduce a new HTTP endpoint `/file_edit_tool_dry_run` to handle dry-run requests for file editing tools.
- Refactor file editing tools (`create_textdoc`, `replace_textdoc`, `update_textdoc`, `update_textdoc_regex`) to support dry-run capability.
- Extract core execution logic into separate functions that accept a `dry` parameter to control whether changes are actually applied or simulated.
- Add `DiffChunk` support across relevant tool execution paths to provide detailed change information for dry-runs.
- Change module visibility for `tool_*` modules in `mod.rs` to public to allow access from the new dry-run feature.

* single-line completion fix (#583)

* Reduce temperature values (initial: 0.2 -> 0.0, no-cache: 0.6 -> 0.5) and remove newline stop token for multiline inputs to improve completion consistency.

* Add new finish reason and improve logging in code completion

Add the "stop-eot" variant to `FinishReason::Stop` mapping in `scratchpad_abstract.rs`. Enhance logging in `code_completion_replace.rs` to issue a warning when a completion is refused due to absence of a code block in the model response, aiding in better debugging and understanding of edge cases.

* Add metadata support check and update handling logic

- Introduce a check for metadata support by calling `is_metadata_supported` in `restream.rs`, affecting the processing flow based on metadata availability.
- Modify `forward_to_openai_endpoint.rs` to rely on `is_metadata_supported` for setting headers instead of conditionally using metadata presence.
- Adjust code completion logic in `code_completion_replace.rs` by trimming cursor line whitespace and updating stop token handling for non-multiline inputs.

* fix: remove '\n' as a stop token in singleline completion

* add comments

---------

Co-authored-by: hamzahasann <[email protected]>

* more readable condition

* pass slice instead of reference to Vec

* collapse else { if cond {} } to else if cond {}

* no need to have 2 copies, we can just move

* pass slice instead of reference to Vec

* reorder to avoid cloning a string
also avoid a completely unnecesary clone of a bool

* reorder to avoid unnecesary clone

* avoid cloning all messages again

* fix: end_str previously was being empty when it shouldn't

* fix: declare line_str before

* delete confusing comment

* readability over performance

* Implement follow-up message generation and topic change detection

- Update the logic for generating follow-up messages and identifying topic changes in conversations.
- Introduce a new struct `FollowUpResponse` to encapsulate follow-ups and topic change status.
- Enhance the `generate_follow_up_message` function to return detailed information using `FollowUpResponse`.
- Modify `_make_conversation` to format conversation history for model input.
- Adjust parameters in `subchat_single` call for improved response handling.
- Update V1 links router to utilize new follow-up message data, reflecting potential new chat suggestions.

* Limit processed chat messages to the last 10 and double token limit in follow-up response generation

* Fix message iteration order in history generation function

Change the iteration order to reverse the entire messages vector first before taking the first 10 entries. This ensures the latest messages are included in the history message display.

* MCP: setup values should arrive now

* MCP session coroutines and stuff

* MCP can shutdown processes

* fix: if threadMode is AGENT or THINKING_AGENT, returning generic AGENT mode for /v1/links request to prevent invalidation

* chore: remove console statement

* git init link impl

* Remove unused imports and comment out unused Git initialization logic

* fix: merge to pathbuf normalize and canonical path

Now it is permissive in windows, and works with strange windows prefixes, any amount of / or \, and long paths, in Unix it still does the same

* test: windows normalization logic

* fix: only import windows necessary types in windows

* fix: absolute paths not touching filesystem works on linux

* fix: replace to pathbuf normalize for canonical path

* Feature: Suggestion popup to open a new chat (#331)

* feat: suggestion UI implemented

* fix: better animation and styling

* feat: getting new_chat_suggestion flag from LSP binary & handling its logic on client side

* fix: updated fixtures for tests and stories

* fix: extracted animation styles logic into css modules

* fix: not allowing LSP to override new_chat_suggested flag from true to false

* chore: delete old SuggestNewChat.tsx

* fix: mention o3-mini as reasoning model in switch

* new qwen25 models with tool usage

* mistral small model with tool use

* fix: show mcp error to the model

* fix: add warning to use npx.cmd and npm.cmd in Windows

* label

* fix(prompt): simplified prompt so gpt-4o-mini can understand correctly if the topic has been changed

* - use shell escape for cmd tool
- remove duplicate filenames in cat tool (ui)

* stronger escape for powershell in cmdtool

* deps

* Create refact.yaml

endpoints for refact selfhost.
docker run -d --rm -p 8008:8008 -v perm-storage:/perm_storage --gpus all smallcloud/refact_self_hosting

* rename to bring_your_own_key/refact_self_hosting.yaml

* move everything to refact-agent/

* move rustfmt.toml

* move everything over to refact-server

* move away .github

* delete integrations.d for now

* move all files to refact-agent/gui

* move rust to engine/

* no "husky install"

* add basic cicd stuff

* disable test

* fix uploading

* quickfix for test13_choredb

* fix double build of server

* fix vecdb and stats in case of insecure https connection, add notes for the future development

* quickfix of stats table

* debug session 1

* less messages

* chore(chaT): sync with changes to alpha, include new patches.

* fix(git ignore): git was ignoring __fixtures__ and __tests__ directories.

* chore(chat): update repository url in package.jsson

* fix(chat)): opening an old chat from history without the newer `suggested_chat` property. (#511)

* Enable reasoning support for models and remove filtering in hook

* Improve error messages in file_edit tools for better clarity

* fix: check if path is absolute for create textdoc before canonicaliza… (#515)

* fix: check if path is absolute for create textdoc before canonicalization

* fix: check for absolute before canonicalize in all text edit tools

* fix: static lsp in predictible path instead of configured, and create docker network if it does not exist

* fix: create network if not exist and get host cache dir

* fix: http request with retries so sync workspace can wait for http server to start

* from manuel: impersonate cosmopolitan to fix static build of sqlite vec

* fix: move dockerignore to engine, since refact-lsp static binary is built from there

* oops. sleep only for debug, not needed now

* feat: allow `globally_allowed_integrations` to be set in integrations.yaml

* fix: include __init__.py

* fix: temp fix for auto generate cdp

* fix: replace async tar with tokio tar to not use different async environments

* fix engine build

* delete rudimental code

* fix: making usage limits for all users (#519)

* fix: making usage limits for all users

* fix: remove unused imports

* fix: hiding upgrade button if not FREE tier & messages adjusted

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* refactor: use git2 status show instead of redundant enum, allow to get diff status of all changes, diff from workdir instead of creating index

* uncommited changes warning message separating unstaged and staged

* remove unused method

* fix: uncommited changes warning, failed integrations links and more should be present also for thinking agent mode

* fix: add usage also for delta collector in streaming in python sdk

* fix: count cache tokens for claude

* fix: increase stream limit

* fix: secrets yaml was not used

* ci(npm publish): better version bump message (#523)

* fix: showing usable models if user's plan is not FREE (#522)

* feat: version bump [email protected] (#525)

* feat: version bump [email protected] (#526)

* feat: version bump [email protected]

* chore: update package-lock.json

* Ci/publish npm fixes (#528)

* ci: create PR instead of direct push

* ci: better PR body text

* ci: pushing to the branch itself instead of PR :/

* ci: use GH_USER to authorize in CI workflow

* Version bump [email protected]

* ci: remove test conditions & rollback package.json package-lock.json

* chore: rollback package.json

* chore: remove early exit 0

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* UI fixes 19 02 25 (#509)

* ordered code_completion_models and code_chat_models

* pass default system prompt into UI

* chore: fix prettier errors

* fix: tool use changing based on if models support tools and agent & fixes for types and stubs in caps

* fix: proper checks for default system prompt

* fix: interacted state for switching tool use manually

* fix: setting local state for first tool use set if no models, then user can click and change tool use

* fix: setting wasAdjusted even if no tool use prederermined

---------

Co-authored-by: alashchev17 <[email protected]>

* chore: version bump, [email protected]

---------

Co-authored-by: Oleg Klimov <[email protected]>
Co-authored-by: Dimitry Ageev <[email protected]>
Co-authored-by: V4LER11 <[email protected]>
Co-authored-by: Humberto Yusta <[email protected]>
Co-authored-by: JegernOUTT <[email protected]>
Co-authored-by: Kirill Starkov <[email protected]>
Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: hamzahasann <[email protected]>
Co-authored-by: MDario123 <[email protected]>
Co-authored-by: ukrolelo <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
MarcMcIntosh added a commit that referenced this pull request Feb 24, 2025
* mcp correct shutdown

* now mcp_fetch() works

* CI should work now

* supports env in MCP

* update settings schema for MCP

* make MCP experimental

* remove 1 dep

* chore: better wording

* fix: hotfix for getThreadMode

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* feat: MCP args/envs tables & proper parsing of field type

* feat: validating MCP args/envs & sending them to the LSP on form submit

* fix(mcp envs): store original order of object props while renaming keys might affect ordering

* chore: remove unnecessary comments

* fix: avoid duplicative code & validate for specific RegExp on form change to disable it

* fix: avoid type cast and use type guards instead

* fix(types/regexp): fix type check for CI & regexp

* chore: adjusted typeguard to avoid type casting

* fix: showing 'No content' if file content is undefined

* fix(trim indent): fixed tests

* chore: return undefined instead of void 0

* fix: disable revert checkpoints button if waiting, streaming or not online

* fix: blacklisted dirs excluded from all repos + refactor open shadow repos to only one method

* fix: do not create abs paths if they are not going to be used, speed improvements for checkpoints

* refactor: rename method

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* oleg chore database and mem database

* iter1: vecdb without lance

* iter2: vecdb without lance

* iter3: vecdb without lance debug

* iter3: vecdb without lance debug2

* rm mem-query
add mem-upd
fixed some bugs

* add vec status to the pubsub sse pipeline

* Remove trailing comma in SQL query to fix syntax error

* init: move compression logic into handler

* trajectory save in memdb

* save traj only

* Add trajectory identifier "local-compressed-traj" in chat handler and update compress_trajectory function to accept an optional vector type.

* Remove unused dependencies from Cargo.toml

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Remove redundant protobuf installation steps from workflows and Dockerfile

* Add vdb_emb_aux module for managing embeddings tables

Introduce a new module `vdb_emb_aux` to handle the management of embeddings tables, including creating unique table names and cleaning up old tables based on their creation timestamps. Implement functions to generate table names using workspace folder hashes, parse table timestamps, retrieve all embedding tables, and delete outdated tables asynchronously. Modify existing code to integrate the new module functionality.

* Implement per-workspace embedding tables with auto-cleanup

Refactored the vector database to support multiple embedding tables per workspace:
- Renamed `create_embeddings_table_name` to `create_emb_table_name` for consistency
- Added table name management in VecDBSqlite and MemoriesDatabase
- Implemented automatic cleanup of old embedding tables based on age and count
- Added configurable retention policy (7 days, max 10 tables)
- Updated all SQL queries to use workspace-specific table names

* Standardize column data types in SQLite virtual table creation

* Add new parameters to compress_trajectory function calls

Updated function calls in autonomy.rs and compress_trajectory.rs to include two new parameters:
an optional value (None) and a boolean flag (true) to maintain compatibility with updated function signature.

* Enable `serde` feature for `chrono` dependency in Cargo.toml

* - Add memdb sleeping point notification during shutdown
- Fix memdb pubsub polling to respect shutdown flag
- Remove old triggers before migration
- Clean up debug logging and improve error messages
- Fix error display format in subchat network error handling

* force http2 support in axum

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* Add tool preservation in trajectory compression

* wip: getting icons from the binary

* feat: using icons from lsp and using terminal icon for all cmdline/service/mcp integrations

* fix(cloud login): set address url when logging in through cloud (#329)

* feat(telemetry): sending telemetry for agent rollback actions

* 2.0.5-alpha.3

* fix: ask model to write 🧩EDITOR in a new line

* feat(patches and diffs): track patch and diff result to send to the ide. (#332)

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333)

* ui: hide uncommitted changes warning when the info or error callout is one screen. (#334)

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* feat: preview first, then apply & error handling

* chore: fixed types in fixtures & stories

* 2.0.5-alpha.4

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333) (#337)

Conflicts:
	src/components/ChatForm/ChatForm.tsx
	src/features/Chat/Thread/reducer.ts

 Changes to be committed:
	modified:   src/components/ChatForm/ChatForm.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/services/refact/types.ts

* 2.0.5

* Knowledge db (#196)

* wip: thread stream.

* wip(chat-db): add middleware to connect to db and get threads.

* fix(jb images): remove "add image" button from jetbrains. (#211)

* fix(jb images): remove "add image" button from jetbrains.

* fix(jb images): make `images` a configurable feature.

* wip(knowledge): add sub end point.

* wip(knowlage db): handle insert, update and delete operations.

* wip(memories): add a basic ui for rendering memories.

* wip(knowledge): add create, delete and search services.

* wip(knowledge): add url for updating usage.

* wip(knowledge): add the knowledge page to the sidebar.

* wip(knowledge): add a basic form for adding knowledge.

* wip(knowledge form): add back button.

* wip(knowledge): add back in listAll and add a scroll area to memories list.

* wip(knowledge): list all and subscribe

* wip(knowledge): add delete functionality.

* ui(knowledge): change the orientation of the data-list depending on size

* wip(knowledge list): remove properties the user doesn't need to see from the data list.

* ui(knowledge list): remove data list and use `m_goal` as the title and `payload` as content.

* feat(knowledge): add a like button.

* ui(thumb): change like button from tick to thumb.

* refactor(knowledge): remove project, type and origin from add knowledge form

* refactor(knowledge): remove `mem-list` endpoint.

* feat(knowledge): hide behind a feature flag.

* feat(feature menu): add a hidden feature menu.

* wip(knowledge): add the ability to edit knowledge.

* fix(feature menu): only allow the code to be entered when nothing if focused.

* wip(knowledge search): add comments and rough search handler

* feat(knowledge): add quick search and fix features usage

* fix(features): add links to setting for features set in settings.

* chore*knowledge): fix linter warnings

* wip(knowledge): add `mem-upd` handler for updating memroies.

* wip(knowledge): add status to subscription payload.

* wip(knowledge): add vectorisation status information.

* wip(knowledge): animate db button while parsing.

* wip(knowledge): debouce search and cache vecdb status.

* refactor(knowledge): move components to separate files.

* ui(knowledge): add titles to the forms.

* ui(knowledge): add padding to items so the scroll bar isn't over the boarder

* linter: allow log for unsupproted type in knowledge stream.

* fix(knowledge): don't wait for consumeStream to resolve, this allows the stream to hangup.

* fix: refetch button if counter state is disaligned on frontend with inference

* fix: user.refetch instead of reset of API state

* fix: updating state of agent usage on refetch of user

* fix: void expression for async refetchUser

* 2.0.3-alpha.25

* 2.0.3

* feat(knowledge): create knowledge from chat.

* wip(knowledge): add a reducer and event listener for the current project name to pass to "/v1/trajectory-save".

* wip(knowledge): export active_project types for vscode.

* fix(knowledge): if the chat is an integration use the project from the integration data.

* wip(knowledge): add a story with a knowledge tool call.

* wip(knowledge): add basic ui for updating knowledge useage.

* fix(knowledge): hang up on unmount.

* wip(knowledge): move subscribe to a thunk so it can hangup requests.

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* 2.0.4-alpha.4

* 2.0.4

* 2.0.5-alpha.0

* Feat: Agent Capabilities (#321)

* feat: better controls for agentic features

* wip(chat-db): add knowledge sub thunk.

* fix: clear memery when make a new request

* wip(knowledge): move search to a thunk.

* Login rework (#320)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(login): add un-themed accordion.

* wip(accordion): light mode style

* wip(accordion): support light and dark mode.

* ui(accordion): use theme colour.

* wip(login): add basic ui for login page.

* ui(login): add padding to the container for the login page.

* wip(login): add msw handlers for story book.

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* wip(email login): add hooks and msw interception for storybook

* ui(login): small ui adjustments.

* wip(login): handle canceling email polling.

* fix(email login): remember to set api key on success.

* wip(login): send setup host event to ide.

* fix(email login redirect): quick fix, will need to look closer at App.tsx routing.

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* wip(login): remove old login pages.

* feat: better controls for agentic features

* test(start enw chat): for some reason stubResizeObserver wasn't being called :/

* wip(login): add provider icons.

* refactor(agent usage): move usage update to getUser hook so email login updates the usage.

* ui(login): add title.

* fix(email message): add missing hooks.

* fix(console.log): remove console log.

* ui(login): fix ui jumping when changing text.

* ui(login): allow all items to be collapsed.

* ui(login): remove text changes because of jumps.

---------

Co-authored-by: alashchev17 <[email protected]>

* refactor: remove old chat-db code.

* fix: preventing user from re-navigation, if history, welcome or chat pages are already in pages history

* Feature: Deepseek Reasoning support (#312)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* feat: THINKING_AGENT mode support for deepseek-reasoning model

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* feat: better controls for agentic features

* feat: showing deepseek reasoner option only for PRO users, placing it in a correct place of all agentic features

* chore: fix component file from merge conflicts

* feat: better wording & hiding agent features if restored thread tool use is not agent

* chore: better semantic name for reasoning switch component

* fix: useGetUser to get user instead of outdated useLogin

* 2.0.5-alpha.1

* ui(knowledge): move like button to bottom of last assistant message.

* fix: cut off for mock data in agent rollback

* 2.0.5-alpha.2

* wip(knowledge): make tool button look nicer.

* wip(knowledge): add spacing around tool content.

* wip(knowledge): add msw handler for updating usage.

---------

Co-authored-by: alashchev17 <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>

* 2.0.5-alpha.5

* 2.0.6-alpha.0

* fix(package-lock): fix merge conflicts.

* fix(package-lock): merge conflicts.

* fix(vscode): `Cannot find module 'redux-persist/es/persistReducer' or its corresponding type declarations` this shouldn't be exported. (#339)

* 2.0.6-alpha.1

* fix: support for new textdoc tools from LSP

* fix: include text_edit tool to list of all patch-like tools

* chore: removed duplicate hot keys option in main dropdown

* fix: make reasoner switch available for FREE tier users

* chore: reasoning listed if user is on FREE tier

* fix: unnecesary lock maintained for long time

* add validation for parameters of integration

* 2.0.6

* chore: bump version to 2.0.7-alpha.1

* fix: filtered out o3-mini from models list

* 2.0.7

* hotfix: rollback disabled for thinking

* 0.10.12

* feat: support http get like http post for internal requests

* check if confirmation needed works inside container

* ask list of tools from remote

* fix: proper filter out tools

* fix: proper path escapes and linux-like container path handling even while on windows

* fix: use shell quote instead of \", add secrets yaml and not just variables, and fix url from file path

* refactor: methtod to copy to container with shell escape and fix with url from file in windows

* init implementation of blocklist mechanism

* additional_indexing_dirs and fixes

* _ls_files_under_version_control_recursive for additional indexing dirs, added blacklist check for dirs without vcs

* WorkspaceIndexingSettings -> GlobalIndexingSettings + return on shut down

* rename

* default indexing yaml

* move to glob from directory name matching

* rename, move things around, rewrite comments

* more renames

* more renames, "how it works" in comments

* almost works, now pattern matching is wrong

* additional_indexing_dirs works

* make DEFAULT_BLOCKLIST_DIRS a base to add to

* refactor: indexing for path taking ref not pathbuf

* make ignore rules appropiate based on blocklist settings

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* fix: unnecesary lock maintained for long time

* TODO in blocklist

* feat: updating integration availability values on switch click from general integrations view page

* feat: error handling & better styling & better code structure

* fix: handling form fields change in better way

* Refactor patch tool to apply_tickets and update related modules

- Rename `tool_patch` to `tool_apply_tickets` for clarity.
- Update functions and variables to use the new module name.
- Change ticket actions from `REWRITE_ONE_SYMBOL` to `REPLACE_SYMBOL`, `REWRITE_WHOLE_FILE` to `REPLACE_FILE`, `PARTIAL_EDIT` to `SECTION_EDIT`.
- Adjust related documentation, tests, and configuration for consistency with new naming conventions.
- Remove unused `locate_as` feature and refactor dependencies accordingly.

* Refactor apply_tickets tool to handle single ticket at a time

Simplified the ticket application workflow by processing one ticket at a time instead of batches. Changes include:
- Renamed tool from `apply_tickets` to `apply_ticket` to reflect single-ticket focus
- Updated API endpoint to accept single `ticket_id` instead of array
- Refactored ticket validation and processing to handle individual tickets
- Updated tool description and usage messages throughout codebase
- Renamed related modules and updated imports

* Rename tool from `apply_ticket` to `apply_edit` for better clarity

* Remove redundant word "any" from project change proposal step in YAML config

* Add handling for PatchAction::DeleteFile in tool_apply_edit.rs

Implement `PatchAction::DeleteFile` to support file removal within the `tool_apply_edit.rs`, ensuring consistent handling of file operations.

* Replace legacy `patch()` with `apply_edit()` and `REPLACE_FILE` with `s` to align with current tool syntax standards in the customization configuration file.

* Replace apply_edit tool with text_edit for file manipulation

Introduces a new text_edit tool that provides direct file manipulation capabilities with two commands:
- `create`: Creates new files with specified content
- `str_replace`: Performs exact string replacements in existing files

The tool includes improved error handling and validation, replacing the previous pin-based editing approach. Updated customization_compiled_in.yaml to reflect the new editing workflow.

* Add `file_replace` command and improve text edit tool feedback

- Added new `file_replace` command alongside existing `create` and `str_replace` commands
- Enhanced text edit tool to return diff chunks instead of simple confirmation message
- Modified command execution to return before/after text content for diff generation
- Updated parameter descriptions in tools documentation
- Fixed scratchpad module to use correct tool name 'apply_edit' instead of 'patch'

* 1. Add `replace_multiple` parameter to text_edit tool to allow replacing multiple occurrences of a string at once
2. Enhance logging in restream.rs by showing full value string instead of truncated version
3. Update text_edit tool description to be more concise and mark it as non-agentic
4. Simplify customization instructions by removing unnecessary prompts and clarifying tool usage

* Normalize line endings during string replacement operations

* Add unit tests for text_edit tool and update usage guidelines

* Update terms for ticket descriptions and coding actions

* Enhance file_manager command description with guidance on str_replace usage

* Refactor and enhance error handling for tool call processing

- Extract a `reply` function to streamline response creation.
- Replace `yield` log with more informative log entries.
- Introduce `_replace_broken_tool_call_messages` to handle invalid tool calls.
- Adjust function names for clarity and expand imports for `HashMap`.
- Improve error messaging in `tool_text_edit.rs` to include file content.

* Add AST indexing synchronization to text edit operations

* Refactor text editing tools and update tool descriptions

- Replace `&parameters` with `&my_parameters` in `src/restream.rs` for consistency.
- Add new `aux.rs` utility functions in `src/tools/file/`.
- Introduce modules `tool_create_textdoc.rs`, `tool_replace_textdoc.rs`, and `tool_update_textdoc.rs` in `src/tools/file/`.
- Update `tools_description.rs` definitions for new text document tools: `create_textdoc`, `replace_textdoc`, and `update_textdoc`.
- Remove old `tool_text_edit.rs` and related tests.
- Adapt customization guidelines in `customization_compiled_in.yaml` to use `*_textdoc()` functions.
- Ensure correct paths and imports in `mod.rs` files.

* Add ToolUpdateTextDocRegex for regex-based text replacements

Introduce a new tool, `ToolUpdateTextDocRegex`, to support document updates based on regular expression pattern replacements. This tool enhances the ability to modify text documents by allowing regex-based matches and replacements, enabling more flexible and complex text manipulation.

- Implement `ToolUpdateTextDocRegex` with necessary argument parsing and execution logic.
- Add `str_replace_regex` function to handle regex-based string replacements in files.
- Update `tools_description.rs` to include the new tool specifications.
- Modify `tool_update_textdoc` to use simple string replacements instead of regex.
- Adjust tool descriptions and agentic status for clarity and optimization.
- Ensure tools are properly registered and integrated into the existing framework.

* Remove outdated guidelines for tool calls and adjust temperature constant

* Remove tool_apply_edit and related components

Eliminate the tool_apply_edit code along with associated components, files, and configurations to streamline the codebase without affecting existing functionalities.

* This commit was made almost by agent

Add `rm` and `mv` tools for file manipulation

- Introduce `ToolRm` for deleting files and directories with options for recursion and dry-run.
- Implement `ToolMv` to move or rename files and directories, with a fallback for cross-device moves and an overwrite option.
- Update `tools_description.rs` to include descriptions and parameters for the new tools.
- Declare new modules `tool_rm` and `tool_mv` in `src/tools/mod.rs`.

* Remove deprecated diff and linter modules

Delete `apply_edit`, `diffs`, and `linters` modules from the project as they are no longer used. This includes removing associated imports, unused route definitions, and related code references. Additionally, make minor updates to logging and error handling in affected files.

* Remove test files for patch functionality

Removed test files related to patch functionality including:
- Test cases for rewriting symbols and file editing
- Example toad/frog implementation files used in tests
- Test runner for partial edit functionality
- Supporting test data files with various patch scenarios

* Normalize path handling and update result semantics

- Integrate `to_pathbuf_normalize` function across various files to standardize path normalization.
- Modify the `result` field from `MatchConfirmDenyResult::PASS` to `MatchConfirmDenyResult::CONFIRMATION` to better reflect the operation's intent.

* Remove 📍-notation reference and clean up example file

Removes outdated 📍-notation reference from tool_locate_search.rs and cleans up redundant example message from links.sh test file.

* Refactor file editing tools and simplify diff chunk generation

Reorganized file editing tools under a new `file_edit` module and simplified the diff chunk generation logic:
- Moved file editing tools from `tools/file` to `tools/file_edit` directory
- Simplified diff chunk generation by removing intermediate DiffLine/DiffBlock structs
- Improved error messages for token budget limitations in chat passthrough
- Updated all relevant import paths to reflect the new module structure

* Update tool descriptions and parameter names for clarity

Refine the descriptions of text document editing tools to highlight their specific use cases, ensuring clearer guidance on when to use each tool. Rename parameters in `tool_replace_textdoc.rs` for better accuracy and consistency with the updated tool descriptions.

* Add file edit dry-run feature and refactor tools with dry-run support

- Introduce a new HTTP endpoint `/file_edit_tool_dry_run` to handle dry-run requests for file editing tools.
- Refactor file editing tools (`create_textdoc`, `replace_textdoc`, `update_textdoc`, `update_textdoc_regex`) to support dry-run capability.
- Extract core execution logic into separate functions that accept a `dry` parameter to control whether changes are actually applied or simulated.
- Add `DiffChunk` support across relevant tool execution paths to provide detailed change information for dry-runs.
- Change module visibility for `tool_*` modules in `mod.rs` to public to allow access from the new dry-run feature.

* single-line completion fix (#583)

* Reduce temperature values (initial: 0.2 -> 0.0, no-cache: 0.6 -> 0.5) and remove newline stop token for multiline inputs to improve completion consistency.

* Add new finish reason and improve logging in code completion

Add the "stop-eot" variant to `FinishReason::Stop` mapping in `scratchpad_abstract.rs`. Enhance logging in `code_completion_replace.rs` to issue a warning when a completion is refused due to absence of a code block in the model response, aiding in better debugging and understanding of edge cases.

* Add metadata support check and update handling logic

- Introduce a check for metadata support by calling `is_metadata_supported` in `restream.rs`, affecting the processing flow based on metadata availability.
- Modify `forward_to_openai_endpoint.rs` to rely on `is_metadata_supported` for setting headers instead of conditionally using metadata presence.
- Adjust code completion logic in `code_completion_replace.rs` by trimming cursor line whitespace and updating stop token handling for non-multiline inputs.

* fix: remove '\n' as a stop token in singleline completion

* add comments

---------

Co-authored-by: hamzahasann <[email protected]>

* more readable condition

* pass slice instead of reference to Vec

* collapse else { if cond {} } to else if cond {}

* no need to have 2 copies, we can just move

* pass slice instead of reference to Vec

* reorder to avoid cloning a string
also avoid a completely unnecesary clone of a bool

* reorder to avoid unnecesary clone

* avoid cloning all messages again

* fix: end_str previously was being empty when it shouldn't

* fix: declare line_str before

* delete confusing comment

* readability over performance

* Implement follow-up message generation and topic change detection

- Update the logic for generating follow-up messages and identifying topic changes in conversations.
- Introduce a new struct `FollowUpResponse` to encapsulate follow-ups and topic change status.
- Enhance the `generate_follow_up_message` function to return detailed information using `FollowUpResponse`.
- Modify `_make_conversation` to format conversation history for model input.
- Adjust parameters in `subchat_single` call for improved response handling.
- Update V1 links router to utilize new follow-up message data, reflecting potential new chat suggestions.

* Limit processed chat messages to the last 10 and double token limit in follow-up response generation

* Fix message iteration order in history generation function

Change the iteration order to reverse the entire messages vector first before taking the first 10 entries. This ensures the latest messages are included in the history message display.

* MCP: setup values should arrive now

* MCP session coroutines and stuff

* MCP can shutdown processes

* fix: if threadMode is AGENT or THINKING_AGENT, returning generic AGENT mode for /v1/links request to prevent invalidation

* chore: remove console statement

* git init link impl

* Remove unused imports and comment out unused Git initialization logic

* fix: merge to pathbuf normalize and canonical path

Now it is permissive in windows, and works with strange windows prefixes, any amount of / or \, and long paths, in Unix it still does the same

* test: windows normalization logic

* fix: only import windows necessary types in windows

* fix: absolute paths not touching filesystem works on linux

* fix: replace to pathbuf normalize for canonical path

* Feature: Suggestion popup to open a new chat (#331)

* feat: suggestion UI implemented

* fix: better animation and styling

* feat: getting new_chat_suggestion flag from LSP binary & handling its logic on client side

* fix: updated fixtures for tests and stories

* fix: extracted animation styles logic into css modules

* fix: not allowing LSP to override new_chat_suggested flag from true to false

* chore: delete old SuggestNewChat.tsx

* fix: mention o3-mini as reasoning model in switch

* new qwen25 models with tool usage

* mistral small model with tool use

* fix: show mcp error to the model

* fix: add warning to use npx.cmd and npm.cmd in Windows

* label

* fix(prompt): simplified prompt so gpt-4o-mini can understand correctly if the topic has been changed

* - use shell escape for cmd tool
- remove duplicate filenames in cat tool (ui)

* stronger escape for powershell in cmdtool

* deps

* Create refact.yaml

endpoints for refact selfhost.
docker run -d --rm -p 8008:8008 -v perm-storage:/perm_storage --gpus all smallcloud/refact_self_hosting

* rename to bring_your_own_key/refact_self_hosting.yaml

* move everything to refact-agent/

* move rustfmt.toml

* move everything over to refact-server

* move away .github

* delete integrations.d for now

* move all files to refact-agent/gui

* move rust to engine/

* no "husky install"

* add basic cicd stuff

* disable test

* fix uploading

* quickfix for test13_choredb

* fix double build of server

* fix vecdb and stats in case of insecure https connection, add notes for the future development

* quickfix of stats table

* debug session 1

* less messages

* chore(chaT): sync with changes to alpha, include new patches.

* fix(git ignore): git was ignoring __fixtures__ and __tests__ directories.

* chore(chat): update repository url in package.jsson

* fix(chat)): opening an old chat from history without the newer `suggested_chat` property. (#511)

* Enable reasoning support for models and remove filtering in hook

* Improve error messages in file_edit tools for better clarity

* fix: check if path is absolute for create textdoc before canonicaliza… (#515)

* fix: check if path is absolute for create textdoc before canonicalization

* fix: check for absolute before canonicalize in all text edit tools

* fix: static lsp in predictible path instead of configured, and create docker network if it does not exist

* fix: create network if not exist and get host cache dir

* fix: http request with retries so sync workspace can wait for http server to start

* from manuel: impersonate cosmopolitan to fix static build of sqlite vec

* fix: move dockerignore to engine, since refact-lsp static binary is built from there

* oops. sleep only for debug, not needed now

* feat: allow `globally_allowed_integrations` to be set in integrations.yaml

* fix: include __init__.py

* fix: temp fix for auto generate cdp

* fix: replace async tar with tokio tar to not use different async environments

* fix engine build

* delete rudimental code

* fix: making usage limits for all users (#519)

* fix: making usage limits for all users

* fix: remove unused imports

* fix: hiding upgrade button if not FREE tier & messages adjusted

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* refactor: use git2 status show instead of redundant enum, allow to get diff status of all changes, diff from workdir instead of creating index

* uncommited changes warning message separating unstaged and staged

* remove unused method

* fix: uncommited changes warning, failed integrations links and more should be present also for thinking agent mode

* fix: add usage also for delta collector in streaming in python sdk

* fix: count cache tokens for claude

* fix: increase stream limit

* fix: secrets yaml was not used

* ci(npm publish): better version bump message (#523)

* fix: showing usable models if user's plan is not FREE (#522)

* feat: version bump [email protected] (#525)

* feat: version bump [email protected] (#526)

* feat: version bump [email protected]

* chore: update package-lock.json

---------

Co-authored-by: Oleg Klimov <[email protected]>
Co-authored-by: Dimitry Ageev <[email protected]>
Co-authored-by: V4LER11 <[email protected]>
Co-authored-by: Humberto Yusta <[email protected]>
Co-authored-by: JegernOUTT <[email protected]>
Co-authored-by: Kirill Starkov <[email protected]>
Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: hamzahasann <[email protected]>
Co-authored-by: MDario123 <[email protected]>
Co-authored-by: ukrolelo <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
MarcMcIntosh pushed a commit that referenced this pull request Feb 24, 2025
)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
MarcMcIntosh added a commit that referenced this pull request Feb 24, 2025
* mcp correct shutdown

* now mcp_fetch() works

* CI should work now

* supports env in MCP

* update settings schema for MCP

* make MCP experimental

* remove 1 dep

* chore: better wording

* fix: hotfix for getThreadMode

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* feat: MCP args/envs tables & proper parsing of field type

* feat: validating MCP args/envs & sending them to the LSP on form submit

* fix(mcp envs): store original order of object props while renaming keys might affect ordering

* chore: remove unnecessary comments

* fix: avoid duplicative code & validate for specific RegExp on form change to disable it

* fix: avoid type cast and use type guards instead

* fix(types/regexp): fix type check for CI & regexp

* chore: adjusted typeguard to avoid type casting

* fix: showing 'No content' if file content is undefined

* fix(trim indent): fixed tests

* chore: return undefined instead of void 0

* fix: disable revert checkpoints button if waiting, streaming or not online

* fix: blacklisted dirs excluded from all repos + refactor open shadow repos to only one method

* fix: do not create abs paths if they are not going to be used, speed improvements for checkpoints

* refactor: rename method

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* oleg chore database and mem database

* iter1: vecdb without lance

* iter2: vecdb without lance

* iter3: vecdb without lance debug

* iter3: vecdb without lance debug2

* rm mem-query
add mem-upd
fixed some bugs

* add vec status to the pubsub sse pipeline

* Remove trailing comma in SQL query to fix syntax error

* init: move compression logic into handler

* trajectory save in memdb

* save traj only

* Add trajectory identifier "local-compressed-traj" in chat handler and update compress_trajectory function to accept an optional vector type.

* Remove unused dependencies from Cargo.toml

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Remove redundant protobuf installation steps from workflows and Dockerfile

* Add vdb_emb_aux module for managing embeddings tables

Introduce a new module `vdb_emb_aux` to handle the management of embeddings tables, including creating unique table names and cleaning up old tables based on their creation timestamps. Implement functions to generate table names using workspace folder hashes, parse table timestamps, retrieve all embedding tables, and delete outdated tables asynchronously. Modify existing code to integrate the new module functionality.

* Implement per-workspace embedding tables with auto-cleanup

Refactored the vector database to support multiple embedding tables per workspace:
- Renamed `create_embeddings_table_name` to `create_emb_table_name` for consistency
- Added table name management in VecDBSqlite and MemoriesDatabase
- Implemented automatic cleanup of old embedding tables based on age and count
- Added configurable retention policy (7 days, max 10 tables)
- Updated all SQL queries to use workspace-specific table names

* Standardize column data types in SQLite virtual table creation

* Add new parameters to compress_trajectory function calls

Updated function calls in autonomy.rs and compress_trajectory.rs to include two new parameters:
an optional value (None) and a boolean flag (true) to maintain compatibility with updated function signature.

* Enable `serde` feature for `chrono` dependency in Cargo.toml

* - Add memdb sleeping point notification during shutdown
- Fix memdb pubsub polling to respect shutdown flag
- Remove old triggers before migration
- Clean up debug logging and improve error messages
- Fix error display format in subchat network error handling

* force http2 support in axum

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* Add tool preservation in trajectory compression

* wip: getting icons from the binary

* feat: using icons from lsp and using terminal icon for all cmdline/service/mcp integrations

* fix(cloud login): set address url when logging in through cloud (#329)

* feat(telemetry): sending telemetry for agent rollback actions

* 2.0.5-alpha.3

* fix: ask model to write 🧩EDITOR in a new line

* feat(patches and diffs): track patch and diff result to send to the ide. (#332)

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333)

* ui: hide uncommitted changes warning when the info or error callout is one screen. (#334)

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* feat: preview first, then apply & error handling

* chore: fixed types in fixtures & stories

* 2.0.5-alpha.4

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333) (#337)

Conflicts:
	src/components/ChatForm/ChatForm.tsx
	src/features/Chat/Thread/reducer.ts

 Changes to be committed:
	modified:   src/components/ChatForm/ChatForm.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/services/refact/types.ts

* 2.0.5

* Knowledge db (#196)

* wip: thread stream.

* wip(chat-db): add middleware to connect to db and get threads.

* fix(jb images): remove "add image" button from jetbrains. (#211)

* fix(jb images): remove "add image" button from jetbrains.

* fix(jb images): make `images` a configurable feature.

* wip(knowledge): add sub end point.

* wip(knowlage db): handle insert, update and delete operations.

* wip(memories): add a basic ui for rendering memories.

* wip(knowledge): add create, delete and search services.

* wip(knowledge): add url for updating usage.

* wip(knowledge): add the knowledge page to the sidebar.

* wip(knowledge): add a basic form for adding knowledge.

* wip(knowledge form): add back button.

* wip(knowledge): add back in listAll and add a scroll area to memories list.

* wip(knowledge): list all and subscribe

* wip(knowledge): add delete functionality.

* ui(knowledge): change the orientation of the data-list depending on size

* wip(knowledge list): remove properties the user doesn't need to see from the data list.

* ui(knowledge list): remove data list and use `m_goal` as the title and `payload` as content.

* feat(knowledge): add a like button.

* ui(thumb): change like button from tick to thumb.

* refactor(knowledge): remove project, type and origin from add knowledge form

* refactor(knowledge): remove `mem-list` endpoint.

* feat(knowledge): hide behind a feature flag.

* feat(feature menu): add a hidden feature menu.

* wip(knowledge): add the ability to edit knowledge.

* fix(feature menu): only allow the code to be entered when nothing if focused.

* wip(knowledge search): add comments and rough search handler

* feat(knowledge): add quick search and fix features usage

* fix(features): add links to setting for features set in settings.

* chore*knowledge): fix linter warnings

* wip(knowledge): add `mem-upd` handler for updating memroies.

* wip(knowledge): add status to subscription payload.

* wip(knowledge): add vectorisation status information.

* wip(knowledge): animate db button while parsing.

* wip(knowledge): debouce search and cache vecdb status.

* refactor(knowledge): move components to separate files.

* ui(knowledge): add titles to the forms.

* ui(knowledge): add padding to items so the scroll bar isn't over the boarder

* linter: allow log for unsupproted type in knowledge stream.

* fix(knowledge): don't wait for consumeStream to resolve, this allows the stream to hangup.

* fix: refetch button if counter state is disaligned on frontend with inference

* fix: user.refetch instead of reset of API state

* fix: updating state of agent usage on refetch of user

* fix: void expression for async refetchUser

* 2.0.3-alpha.25

* 2.0.3

* feat(knowledge): create knowledge from chat.

* wip(knowledge): add a reducer and event listener for the current project name to pass to "/v1/trajectory-save".

* wip(knowledge): export active_project types for vscode.

* fix(knowledge): if the chat is an integration use the project from the integration data.

* wip(knowledge): add a story with a knowledge tool call.

* wip(knowledge): add basic ui for updating knowledge useage.

* fix(knowledge): hang up on unmount.

* wip(knowledge): move subscribe to a thunk so it can hangup requests.

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* 2.0.4-alpha.4

* 2.0.4

* 2.0.5-alpha.0

* Feat: Agent Capabilities (#321)

* feat: better controls for agentic features

* wip(chat-db): add knowledge sub thunk.

* fix: clear memery when make a new request

* wip(knowledge): move search to a thunk.

* Login rework (#320)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(login): add un-themed accordion.

* wip(accordion): light mode style

* wip(accordion): support light and dark mode.

* ui(accordion): use theme colour.

* wip(login): add basic ui for login page.

* ui(login): add padding to the container for the login page.

* wip(login): add msw handlers for story book.

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* wip(email login): add hooks and msw interception for storybook

* ui(login): small ui adjustments.

* wip(login): handle canceling email polling.

* fix(email login): remember to set api key on success.

* wip(login): send setup host event to ide.

* fix(email login redirect): quick fix, will need to look closer at App.tsx routing.

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* wip(login): remove old login pages.

* feat: better controls for agentic features

* test(start enw chat): for some reason stubResizeObserver wasn't being called :/

* wip(login): add provider icons.

* refactor(agent usage): move usage update to getUser hook so email login updates the usage.

* ui(login): add title.

* fix(email message): add missing hooks.

* fix(console.log): remove console log.

* ui(login): fix ui jumping when changing text.

* ui(login): allow all items to be collapsed.

* ui(login): remove text changes because of jumps.

---------

Co-authored-by: alashchev17 <[email protected]>

* refactor: remove old chat-db code.

* fix: preventing user from re-navigation, if history, welcome or chat pages are already in pages history

* Feature: Deepseek Reasoning support (#312)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* feat: THINKING_AGENT mode support for deepseek-reasoning model

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* feat: better controls for agentic features

* feat: showing deepseek reasoner option only for PRO users, placing it in a correct place of all agentic features

* chore: fix component file from merge conflicts

* feat: better wording & hiding agent features if restored thread tool use is not agent

* chore: better semantic name for reasoning switch component

* fix: useGetUser to get user instead of outdated useLogin

* 2.0.5-alpha.1

* ui(knowledge): move like button to bottom of last assistant message.

* fix: cut off for mock data in agent rollback

* 2.0.5-alpha.2

* wip(knowledge): make tool button look nicer.

* wip(knowledge): add spacing around tool content.

* wip(knowledge): add msw handler for updating usage.

---------

Co-authored-by: alashchev17 <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>

* 2.0.5-alpha.5

* 2.0.6-alpha.0

* fix(package-lock): fix merge conflicts.

* fix(package-lock): merge conflicts.

* fix(vscode): `Cannot find module 'redux-persist/es/persistReducer' or its corresponding type declarations` this shouldn't be exported. (#339)

* 2.0.6-alpha.1

* fix: support for new textdoc tools from LSP

* fix: include text_edit tool to list of all patch-like tools

* chore: removed duplicate hot keys option in main dropdown

* fix: make reasoner switch available for FREE tier users

* chore: reasoning listed if user is on FREE tier

* fix: unnecesary lock maintained for long time

* add validation for parameters of integration

* 2.0.6

* chore: bump version to 2.0.7-alpha.1

* fix: filtered out o3-mini from models list

* 2.0.7

* hotfix: rollback disabled for thinking

* 0.10.12

* feat: support http get like http post for internal requests

* check if confirmation needed works inside container

* ask list of tools from remote

* fix: proper filter out tools

* fix: proper path escapes and linux-like container path handling even while on windows

* fix: use shell quote instead of \", add secrets yaml and not just variables, and fix url from file path

* refactor: methtod to copy to container with shell escape and fix with url from file in windows

* init implementation of blocklist mechanism

* additional_indexing_dirs and fixes

* _ls_files_under_version_control_recursive for additional indexing dirs, added blacklist check for dirs without vcs

* WorkspaceIndexingSettings -> GlobalIndexingSettings + return on shut down

* rename

* default indexing yaml

* move to glob from directory name matching

* rename, move things around, rewrite comments

* more renames

* more renames, "how it works" in comments

* almost works, now pattern matching is wrong

* additional_indexing_dirs works

* make DEFAULT_BLOCKLIST_DIRS a base to add to

* refactor: indexing for path taking ref not pathbuf

* make ignore rules appropiate based on blocklist settings

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* fix: unnecesary lock maintained for long time

* TODO in blocklist

* feat: updating integration availability values on switch click from general integrations view page

* feat: error handling & better styling & better code structure

* fix: handling form fields change in better way

* Refactor patch tool to apply_tickets and update related modules

- Rename `tool_patch` to `tool_apply_tickets` for clarity.
- Update functions and variables to use the new module name.
- Change ticket actions from `REWRITE_ONE_SYMBOL` to `REPLACE_SYMBOL`, `REWRITE_WHOLE_FILE` to `REPLACE_FILE`, `PARTIAL_EDIT` to `SECTION_EDIT`.
- Adjust related documentation, tests, and configuration for consistency with new naming conventions.
- Remove unused `locate_as` feature and refactor dependencies accordingly.

* Refactor apply_tickets tool to handle single ticket at a time

Simplified the ticket application workflow by processing one ticket at a time instead of batches. Changes include:
- Renamed tool from `apply_tickets` to `apply_ticket` to reflect single-ticket focus
- Updated API endpoint to accept single `ticket_id` instead of array
- Refactored ticket validation and processing to handle individual tickets
- Updated tool description and usage messages throughout codebase
- Renamed related modules and updated imports

* Rename tool from `apply_ticket` to `apply_edit` for better clarity

* Remove redundant word "any" from project change proposal step in YAML config

* Add handling for PatchAction::DeleteFile in tool_apply_edit.rs

Implement `PatchAction::DeleteFile` to support file removal within the `tool_apply_edit.rs`, ensuring consistent handling of file operations.

* Replace legacy `patch()` with `apply_edit()` and `REPLACE_FILE` with `s` to align with current tool syntax standards in the customization configuration file.

* Replace apply_edit tool with text_edit for file manipulation

Introduces a new text_edit tool that provides direct file manipulation capabilities with two commands:
- `create`: Creates new files with specified content
- `str_replace`: Performs exact string replacements in existing files

The tool includes improved error handling and validation, replacing the previous pin-based editing approach. Updated customization_compiled_in.yaml to reflect the new editing workflow.

* Add `file_replace` command and improve text edit tool feedback

- Added new `file_replace` command alongside existing `create` and `str_replace` commands
- Enhanced text edit tool to return diff chunks instead of simple confirmation message
- Modified command execution to return before/after text content for diff generation
- Updated parameter descriptions in tools documentation
- Fixed scratchpad module to use correct tool name 'apply_edit' instead of 'patch'

* 1. Add `replace_multiple` parameter to text_edit tool to allow replacing multiple occurrences of a string at once
2. Enhance logging in restream.rs by showing full value string instead of truncated version
3. Update text_edit tool description to be more concise and mark it as non-agentic
4. Simplify customization instructions by removing unnecessary prompts and clarifying tool usage

* Normalize line endings during string replacement operations

* Add unit tests for text_edit tool and update usage guidelines

* Update terms for ticket descriptions and coding actions

* Enhance file_manager command description with guidance on str_replace usage

* Refactor and enhance error handling for tool call processing

- Extract a `reply` function to streamline response creation.
- Replace `yield` log with more informative log entries.
- Introduce `_replace_broken_tool_call_messages` to handle invalid tool calls.
- Adjust function names for clarity and expand imports for `HashMap`.
- Improve error messaging in `tool_text_edit.rs` to include file content.

* Add AST indexing synchronization to text edit operations

* Refactor text editing tools and update tool descriptions

- Replace `&parameters` with `&my_parameters` in `src/restream.rs` for consistency.
- Add new `aux.rs` utility functions in `src/tools/file/`.
- Introduce modules `tool_create_textdoc.rs`, `tool_replace_textdoc.rs`, and `tool_update_textdoc.rs` in `src/tools/file/`.
- Update `tools_description.rs` definitions for new text document tools: `create_textdoc`, `replace_textdoc`, and `update_textdoc`.
- Remove old `tool_text_edit.rs` and related tests.
- Adapt customization guidelines in `customization_compiled_in.yaml` to use `*_textdoc()` functions.
- Ensure correct paths and imports in `mod.rs` files.

* Add ToolUpdateTextDocRegex for regex-based text replacements

Introduce a new tool, `ToolUpdateTextDocRegex`, to support document updates based on regular expression pattern replacements. This tool enhances the ability to modify text documents by allowing regex-based matches and replacements, enabling more flexible and complex text manipulation.

- Implement `ToolUpdateTextDocRegex` with necessary argument parsing and execution logic.
- Add `str_replace_regex` function to handle regex-based string replacements in files.
- Update `tools_description.rs` to include the new tool specifications.
- Modify `tool_update_textdoc` to use simple string replacements instead of regex.
- Adjust tool descriptions and agentic status for clarity and optimization.
- Ensure tools are properly registered and integrated into the existing framework.

* Remove outdated guidelines for tool calls and adjust temperature constant

* Remove tool_apply_edit and related components

Eliminate the tool_apply_edit code along with associated components, files, and configurations to streamline the codebase without affecting existing functionalities.

* This commit was made almost by agent

Add `rm` and `mv` tools for file manipulation

- Introduce `ToolRm` for deleting files and directories with options for recursion and dry-run.
- Implement `ToolMv` to move or rename files and directories, with a fallback for cross-device moves and an overwrite option.
- Update `tools_description.rs` to include descriptions and parameters for the new tools.
- Declare new modules `tool_rm` and `tool_mv` in `src/tools/mod.rs`.

* Remove deprecated diff and linter modules

Delete `apply_edit`, `diffs`, and `linters` modules from the project as they are no longer used. This includes removing associated imports, unused route definitions, and related code references. Additionally, make minor updates to logging and error handling in affected files.

* Remove test files for patch functionality

Removed test files related to patch functionality including:
- Test cases for rewriting symbols and file editing
- Example toad/frog implementation files used in tests
- Test runner for partial edit functionality
- Supporting test data files with various patch scenarios

* Normalize path handling and update result semantics

- Integrate `to_pathbuf_normalize` function across various files to standardize path normalization.
- Modify the `result` field from `MatchConfirmDenyResult::PASS` to `MatchConfirmDenyResult::CONFIRMATION` to better reflect the operation's intent.

* Remove 📍-notation reference and clean up example file

Removes outdated 📍-notation reference from tool_locate_search.rs and cleans up redundant example message from links.sh test file.

* Refactor file editing tools and simplify diff chunk generation

Reorganized file editing tools under a new `file_edit` module and simplified the diff chunk generation logic:
- Moved file editing tools from `tools/file` to `tools/file_edit` directory
- Simplified diff chunk generation by removing intermediate DiffLine/DiffBlock structs
- Improved error messages for token budget limitations in chat passthrough
- Updated all relevant import paths to reflect the new module structure

* Update tool descriptions and parameter names for clarity

Refine the descriptions of text document editing tools to highlight their specific use cases, ensuring clearer guidance on when to use each tool. Rename parameters in `tool_replace_textdoc.rs` for better accuracy and consistency with the updated tool descriptions.

* Add file edit dry-run feature and refactor tools with dry-run support

- Introduce a new HTTP endpoint `/file_edit_tool_dry_run` to handle dry-run requests for file editing tools.
- Refactor file editing tools (`create_textdoc`, `replace_textdoc`, `update_textdoc`, `update_textdoc_regex`) to support dry-run capability.
- Extract core execution logic into separate functions that accept a `dry` parameter to control whether changes are actually applied or simulated.
- Add `DiffChunk` support across relevant tool execution paths to provide detailed change information for dry-runs.
- Change module visibility for `tool_*` modules in `mod.rs` to public to allow access from the new dry-run feature.

* single-line completion fix (#583)

* Reduce temperature values (initial: 0.2 -> 0.0, no-cache: 0.6 -> 0.5) and remove newline stop token for multiline inputs to improve completion consistency.

* Add new finish reason and improve logging in code completion

Add the "stop-eot" variant to `FinishReason::Stop` mapping in `scratchpad_abstract.rs`. Enhance logging in `code_completion_replace.rs` to issue a warning when a completion is refused due to absence of a code block in the model response, aiding in better debugging and understanding of edge cases.

* Add metadata support check and update handling logic

- Introduce a check for metadata support by calling `is_metadata_supported` in `restream.rs`, affecting the processing flow based on metadata availability.
- Modify `forward_to_openai_endpoint.rs` to rely on `is_metadata_supported` for setting headers instead of conditionally using metadata presence.
- Adjust code completion logic in `code_completion_replace.rs` by trimming cursor line whitespace and updating stop token handling for non-multiline inputs.

* fix: remove '\n' as a stop token in singleline completion

* add comments

---------

Co-authored-by: hamzahasann <[email protected]>

* more readable condition

* pass slice instead of reference to Vec

* collapse else { if cond {} } to else if cond {}

* no need to have 2 copies, we can just move

* pass slice instead of reference to Vec

* reorder to avoid cloning a string
also avoid a completely unnecesary clone of a bool

* reorder to avoid unnecesary clone

* avoid cloning all messages again

* fix: end_str previously was being empty when it shouldn't

* fix: declare line_str before

* delete confusing comment

* readability over performance

* Implement follow-up message generation and topic change detection

- Update the logic for generating follow-up messages and identifying topic changes in conversations.
- Introduce a new struct `FollowUpResponse` to encapsulate follow-ups and topic change status.
- Enhance the `generate_follow_up_message` function to return detailed information using `FollowUpResponse`.
- Modify `_make_conversation` to format conversation history for model input.
- Adjust parameters in `subchat_single` call for improved response handling.
- Update V1 links router to utilize new follow-up message data, reflecting potential new chat suggestions.

* Limit processed chat messages to the last 10 and double token limit in follow-up response generation

* Fix message iteration order in history generation function

Change the iteration order to reverse the entire messages vector first before taking the first 10 entries. This ensures the latest messages are included in the history message display.

* MCP: setup values should arrive now

* MCP session coroutines and stuff

* MCP can shutdown processes

* fix: if threadMode is AGENT or THINKING_AGENT, returning generic AGENT mode for /v1/links request to prevent invalidation

* chore: remove console statement

* git init link impl

* Remove unused imports and comment out unused Git initialization logic

* fix: merge to pathbuf normalize and canonical path

Now it is permissive in windows, and works with strange windows prefixes, any amount of / or \, and long paths, in Unix it still does the same

* test: windows normalization logic

* fix: only import windows necessary types in windows

* fix: absolute paths not touching filesystem works on linux

* fix: replace to pathbuf normalize for canonical path

* Feature: Suggestion popup to open a new chat (#331)

* feat: suggestion UI implemented

* fix: better animation and styling

* feat: getting new_chat_suggestion flag from LSP binary & handling its logic on client side

* fix: updated fixtures for tests and stories

* fix: extracted animation styles logic into css modules

* fix: not allowing LSP to override new_chat_suggested flag from true to false

* chore: delete old SuggestNewChat.tsx

* fix: mention o3-mini as reasoning model in switch

* new qwen25 models with tool usage

* mistral small model with tool use

* fix: show mcp error to the model

* fix: add warning to use npx.cmd and npm.cmd in Windows

* label

* fix(prompt): simplified prompt so gpt-4o-mini can understand correctly if the topic has been changed

* - use shell escape for cmd tool
- remove duplicate filenames in cat tool (ui)

* stronger escape for powershell in cmdtool

* deps

* Create refact.yaml

endpoints for refact selfhost.
docker run -d --rm -p 8008:8008 -v perm-storage:/perm_storage --gpus all smallcloud/refact_self_hosting

* rename to bring_your_own_key/refact_self_hosting.yaml

* move everything to refact-agent/

* move rustfmt.toml

* move everything over to refact-server

* move away .github

* delete integrations.d for now

* move all files to refact-agent/gui

* move rust to engine/

* no "husky install"

* add basic cicd stuff

* disable test

* fix uploading

* quickfix for test13_choredb

* fix double build of server

* fix vecdb and stats in case of insecure https connection, add notes for the future development

* quickfix of stats table

* debug session 1

* less messages

* chore(chaT): sync with changes to alpha, include new patches.

* fix(git ignore): git was ignoring __fixtures__ and __tests__ directories.

* chore(chat): update repository url in package.jsson

* fix(chat)): opening an old chat from history without the newer `suggested_chat` property. (#511)

* Enable reasoning support for models and remove filtering in hook

* Improve error messages in file_edit tools for better clarity

* fix: check if path is absolute for create textdoc before canonicaliza… (#515)

* fix: check if path is absolute for create textdoc before canonicalization

* fix: check for absolute before canonicalize in all text edit tools

* fix: static lsp in predictible path instead of configured, and create docker network if it does not exist

* fix: create network if not exist and get host cache dir

* fix: http request with retries so sync workspace can wait for http server to start

* from manuel: impersonate cosmopolitan to fix static build of sqlite vec

* fix: move dockerignore to engine, since refact-lsp static binary is built from there

* oops. sleep only for debug, not needed now

* feat: allow `globally_allowed_integrations` to be set in integrations.yaml

* fix: include __init__.py

* fix: temp fix for auto generate cdp

* fix: replace async tar with tokio tar to not use different async environments

* fix engine build

* delete rudimental code

* fix: making usage limits for all users (#519)

* fix: making usage limits for all users

* fix: remove unused imports

* fix: hiding upgrade button if not FREE tier & messages adjusted

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* refactor: use git2 status show instead of redundant enum, allow to get diff status of all changes, diff from workdir instead of creating index

* uncommited changes warning message separating unstaged and staged

* remove unused method

* fix: uncommited changes warning, failed integrations links and more should be present also for thinking agent mode

* fix: add usage also for delta collector in streaming in python sdk

* fix: count cache tokens for claude

* fix: increase stream limit

* fix: secrets yaml was not used

* ci(npm publish): better version bump message (#523)

* fix: showing usable models if user's plan is not FREE (#522)

* feat: version bump [email protected] (#525)

* feat: version bump [email protected] (#526)

* feat: version bump [email protected]

* chore: update package-lock.json

---------

Co-authored-by: Oleg Klimov <[email protected]>
Co-authored-by: Dimitry Ageev <[email protected]>
Co-authored-by: V4LER11 <[email protected]>
Co-authored-by: Humberto Yusta <[email protected]>
Co-authored-by: JegernOUTT <[email protected]>
Co-authored-by: Kirill Starkov <[email protected]>
Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: hamzahasann <[email protected]>
Co-authored-by: MDario123 <[email protected]>
Co-authored-by: ukrolelo <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
JegernOUTT added a commit that referenced this pull request Feb 25, 2025
* update settings schema for MCP

* make MCP experimental

* remove 1 dep

* chore: better wording

* fix: hotfix for getThreadMode

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* feat: MCP args/envs tables & proper parsing of field type

* feat: validating MCP args/envs & sending them to the LSP on form submit

* fix(mcp envs): store original order of object props while renaming keys might affect ordering

* chore: remove unnecessary comments

* fix: avoid duplicative code & validate for specific RegExp on form change to disable it

* fix: avoid type cast and use type guards instead

* fix(types/regexp): fix type check for CI & regexp

* chore: adjusted typeguard to avoid type casting

* fix: showing 'No content' if file content is undefined

* fix(trim indent): fixed tests

* chore: return undefined instead of void 0

* fix: disable revert checkpoints button if waiting, streaming or not online

* fix: blacklisted dirs excluded from all repos + refactor open shadow repos to only one method

* fix: do not create abs paths if they are not going to be used, speed improvements for checkpoints

* refactor: rename method

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* oleg chore database and mem database

* iter1: vecdb without lance

* iter2: vecdb without lance

* iter3: vecdb without lance debug

* iter3: vecdb without lance debug2

* rm mem-query
add mem-upd
fixed some bugs

* add vec status to the pubsub sse pipeline

* Remove trailing comma in SQL query to fix syntax error

* init: move compression logic into handler

* trajectory save in memdb

* save traj only

* Add trajectory identifier "local-compressed-traj" in chat handler and update compress_trajectory function to accept an optional vector type.

* Remove unused dependencies from Cargo.toml

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Remove redundant protobuf installation steps from workflows and Dockerfile

* Add vdb_emb_aux module for managing embeddings tables

Introduce a new module `vdb_emb_aux` to handle the management of embeddings tables, including creating unique table names and cleaning up old tables based on their creation timestamps. Implement functions to generate table names using workspace folder hashes, parse table timestamps, retrieve all embedding tables, and delete outdated tables asynchronously. Modify existing code to integrate the new module functionality.

* Implement per-workspace embedding tables with auto-cleanup

Refactored the vector database to support multiple embedding tables per workspace:
- Renamed `create_embeddings_table_name` to `create_emb_table_name` for consistency
- Added table name management in VecDBSqlite and MemoriesDatabase
- Implemented automatic cleanup of old embedding tables based on age and count
- Added configurable retention policy (7 days, max 10 tables)
- Updated all SQL queries to use workspace-specific table names

* Standardize column data types in SQLite virtual table creation

* Add new parameters to compress_trajectory function calls

Updated function calls in autonomy.rs and compress_trajectory.rs to include two new parameters:
an optional value (None) and a boolean flag (true) to maintain compatibility with updated function signature.

* Enable `serde` feature for `chrono` dependency in Cargo.toml

* - Add memdb sleeping point notification during shutdown
- Fix memdb pubsub polling to respect shutdown flag
- Remove old triggers before migration
- Clean up debug logging and improve error messages
- Fix error display format in subchat network error handling

* force http2 support in axum

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* Add tool preservation in trajectory compression

* wip: getting icons from the binary

* feat: using icons from lsp and using terminal icon for all cmdline/service/mcp integrations

* fix(cloud login): set address url when logging in through cloud (#329)

* feat(telemetry): sending telemetry for agent rollback actions

* 2.0.5-alpha.3

* fix: ask model to write 🧩EDITOR in a new line

* feat(patches and diffs): track patch and diff result to send to the ide. (#332)

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333)

* ui: hide uncommitted changes warning when the info or error callout is one screen. (#334)

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* feat: preview first, then apply & error handling

* chore: fixed types in fixtures & stories

* 2.0.5-alpha.4

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333) (#337)

Conflicts:
	src/components/ChatForm/ChatForm.tsx
	src/features/Chat/Thread/reducer.ts

 Changes to be committed:
	modified:   src/components/ChatForm/ChatForm.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/services/refact/types.ts

* 2.0.5

* Knowledge db (#196)

* wip: thread stream.

* wip(chat-db): add middleware to connect to db and get threads.

* fix(jb images): remove "add image" button from jetbrains. (#211)

* fix(jb images): remove "add image" button from jetbrains.

* fix(jb images): make `images` a configurable feature.

* wip(knowledge): add sub end point.

* wip(knowlage db): handle insert, update and delete operations.

* wip(memories): add a basic ui for rendering memories.

* wip(knowledge): add create, delete and search services.

* wip(knowledge): add url for updating usage.

* wip(knowledge): add the knowledge page to the sidebar.

* wip(knowledge): add a basic form for adding knowledge.

* wip(knowledge form): add back button.

* wip(knowledge): add back in listAll and add a scroll area to memories list.

* wip(knowledge): list all and subscribe

* wip(knowledge): add delete functionality.

* ui(knowledge): change the orientation of the data-list depending on size

* wip(knowledge list): remove properties the user doesn't need to see from the data list.

* ui(knowledge list): remove data list and use `m_goal` as the title and `payload` as content.

* feat(knowledge): add a like button.

* ui(thumb): change like button from tick to thumb.

* refactor(knowledge): remove project, type and origin from add knowledge form

* refactor(knowledge): remove `mem-list` endpoint.

* feat(knowledge): hide behind a feature flag.

* feat(feature menu): add a hidden feature menu.

* wip(knowledge): add the ability to edit knowledge.

* fix(feature menu): only allow the code to be entered when nothing if focused.

* wip(knowledge search): add comments and rough search handler

* feat(knowledge): add quick search and fix features usage

* fix(features): add links to setting for features set in settings.

* chore*knowledge): fix linter warnings

* wip(knowledge): add `mem-upd` handler for updating memroies.

* wip(knowledge): add status to subscription payload.

* wip(knowledge): add vectorisation status information.

* wip(knowledge): animate db button while parsing.

* wip(knowledge): debouce search and cache vecdb status.

* refactor(knowledge): move components to separate files.

* ui(knowledge): add titles to the forms.

* ui(knowledge): add padding to items so the scroll bar isn't over the boarder

* linter: allow log for unsupproted type in knowledge stream.

* fix(knowledge): don't wait for consumeStream to resolve, this allows the stream to hangup.

* fix: refetch button if counter state is disaligned on frontend with inference

* fix: user.refetch instead of reset of API state

* fix: updating state of agent usage on refetch of user

* fix: void expression for async refetchUser

* 2.0.3-alpha.25

* 2.0.3

* feat(knowledge): create knowledge from chat.

* wip(knowledge): add a reducer and event listener for the current project name to pass to "/v1/trajectory-save".

* wip(knowledge): export active_project types for vscode.

* fix(knowledge): if the chat is an integration use the project from the integration data.

* wip(knowledge): add a story with a knowledge tool call.

* wip(knowledge): add basic ui for updating knowledge useage.

* fix(knowledge): hang up on unmount.

* wip(knowledge): move subscribe to a thunk so it can hangup requests.

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* 2.0.4-alpha.4

* 2.0.4

* 2.0.5-alpha.0

* Feat: Agent Capabilities (#321)

* feat: better controls for agentic features

* wip(chat-db): add knowledge sub thunk.

* fix: clear memery when make a new request

* wip(knowledge): move search to a thunk.

* Login rework (#320)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(login): add un-themed accordion.

* wip(accordion): light mode style

* wip(accordion): support light and dark mode.

* ui(accordion): use theme colour.

* wip(login): add basic ui for login page.

* ui(login): add padding to the container for the login page.

* wip(login): add msw handlers for story book.

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* wip(email login): add hooks and msw interception for storybook

* ui(login): small ui adjustments.

* wip(login): handle canceling email polling.

* fix(email login): remember to set api key on success.

* wip(login): send setup host event to ide.

* fix(email login redirect): quick fix, will need to look closer at App.tsx routing.

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* wip(login): remove old login pages.

* feat: better controls for agentic features

* test(start enw chat): for some reason stubResizeObserver wasn't being called :/

* wip(login): add provider icons.

* refactor(agent usage): move usage update to getUser hook so email login updates the usage.

* ui(login): add title.

* fix(email message): add missing hooks.

* fix(console.log): remove console log.

* ui(login): fix ui jumping when changing text.

* ui(login): allow all items to be collapsed.

* ui(login): remove text changes because of jumps.

---------

Co-authored-by: alashchev17 <[email protected]>

* refactor: remove old chat-db code.

* fix: preventing user from re-navigation, if history, welcome or chat pages are already in pages history

* Feature: Deepseek Reasoning support (#312)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* feat: THINKING_AGENT mode support for deepseek-reasoning model

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* feat: better controls for agentic features

* feat: showing deepseek reasoner option only for PRO users, placing it in a correct place of all agentic features

* chore: fix component file from merge conflicts

* feat: better wording & hiding agent features if restored thread tool use is not agent

* chore: better semantic name for reasoning switch component

* fix: useGetUser to get user instead of outdated useLogin

* 2.0.5-alpha.1

* ui(knowledge): move like button to bottom of last assistant message.

* fix: cut off for mock data in agent rollback

* 2.0.5-alpha.2

* wip(knowledge): make tool button look nicer.

* wip(knowledge): add spacing around tool content.

* wip(knowledge): add msw handler for updating usage.

---------

Co-authored-by: alashchev17 <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>

* 2.0.5-alpha.5

* 2.0.6-alpha.0

* fix(package-lock): fix merge conflicts.

* fix(package-lock): merge conflicts.

* fix(vscode): `Cannot find module 'redux-persist/es/persistReducer' or its corresponding type declarations` this shouldn't be exported. (#339)

* 2.0.6-alpha.1

* fix: support for new textdoc tools from LSP

* fix: include text_edit tool to list of all patch-like tools

* chore: removed duplicate hot keys option in main dropdown

* fix: make reasoner switch available for FREE tier users

* chore: reasoning listed if user is on FREE tier

* fix: unnecesary lock maintained for long time

* add validation for parameters of integration

* 2.0.6

* chore: bump version to 2.0.7-alpha.1

* fix: filtered out o3-mini from models list

* 2.0.7

* hotfix: rollback disabled for thinking

* 0.10.12

* feat: support http get like http post for internal requests

* check if confirmation needed works inside container

* ask list of tools from remote

* fix: proper filter out tools

* fix: proper path escapes and linux-like container path handling even while on windows

* fix: use shell quote instead of \", add secrets yaml and not just variables, and fix url from file path

* refactor: methtod to copy to container with shell escape and fix with url from file in windows

* init implementation of blocklist mechanism

* additional_indexing_dirs and fixes

* _ls_files_under_version_control_recursive for additional indexing dirs, added blacklist check for dirs without vcs

* WorkspaceIndexingSettings -> GlobalIndexingSettings + return on shut down

* rename

* default indexing yaml

* move to glob from directory name matching

* rename, move things around, rewrite comments

* more renames

* more renames, "how it works" in comments

* almost works, now pattern matching is wrong

* additional_indexing_dirs works

* make DEFAULT_BLOCKLIST_DIRS a base to add to

* refactor: indexing for path taking ref not pathbuf

* make ignore rules appropiate based on blocklist settings

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* fix: unnecesary lock maintained for long time

* TODO in blocklist

* feat: updating integration availability values on switch click from general integrations view page

* feat: error handling & better styling & better code structure

* fix: handling form fields change in better way

* Refactor patch tool to apply_tickets and update related modules

- Rename `tool_patch` to `tool_apply_tickets` for clarity.
- Update functions and variables to use the new module name.
- Change ticket actions from `REWRITE_ONE_SYMBOL` to `REPLACE_SYMBOL`, `REWRITE_WHOLE_FILE` to `REPLACE_FILE`, `PARTIAL_EDIT` to `SECTION_EDIT`.
- Adjust related documentation, tests, and configuration for consistency with new naming conventions.
- Remove unused `locate_as` feature and refactor dependencies accordingly.

* Refactor apply_tickets tool to handle single ticket at a time

Simplified the ticket application workflow by processing one ticket at a time instead of batches. Changes include:
- Renamed tool from `apply_tickets` to `apply_ticket` to reflect single-ticket focus
- Updated API endpoint to accept single `ticket_id` instead of array
- Refactored ticket validation and processing to handle individual tickets
- Updated tool description and usage messages throughout codebase
- Renamed related modules and updated imports

* Rename tool from `apply_ticket` to `apply_edit` for better clarity

* Remove redundant word "any" from project change proposal step in YAML config

* Add handling for PatchAction::DeleteFile in tool_apply_edit.rs

Implement `PatchAction::DeleteFile` to support file removal within the `tool_apply_edit.rs`, ensuring consistent handling of file operations.

* Replace legacy `patch()` with `apply_edit()` and `REPLACE_FILE` with `s` to align with current tool syntax standards in the customization configuration file.

* Replace apply_edit tool with text_edit for file manipulation

Introduces a new text_edit tool that provides direct file manipulation capabilities with two commands:
- `create`: Creates new files with specified content
- `str_replace`: Performs exact string replacements in existing files

The tool includes improved error handling and validation, replacing the previous pin-based editing approach. Updated customization_compiled_in.yaml to reflect the new editing workflow.

* Add `file_replace` command and improve text edit tool feedback

- Added new `file_replace` command alongside existing `create` and `str_replace` commands
- Enhanced text edit tool to return diff chunks instead of simple confirmation message
- Modified command execution to return before/after text content for diff generation
- Updated parameter descriptions in tools documentation
- Fixed scratchpad module to use correct tool name 'apply_edit' instead of 'patch'

* 1. Add `replace_multiple` parameter to text_edit tool to allow replacing multiple occurrences of a string at once
2. Enhance logging in restream.rs by showing full value string instead of truncated version
3. Update text_edit tool description to be more concise and mark it as non-agentic
4. Simplify customization instructions by removing unnecessary prompts and clarifying tool usage

* Normalize line endings during string replacement operations

* Add unit tests for text_edit tool and update usage guidelines

* Update terms for ticket descriptions and coding actions

* Enhance file_manager command description with guidance on str_replace usage

* Refactor and enhance error handling for tool call processing

- Extract a `reply` function to streamline response creation.
- Replace `yield` log with more informative log entries.
- Introduce `_replace_broken_tool_call_messages` to handle invalid tool calls.
- Adjust function names for clarity and expand imports for `HashMap`.
- Improve error messaging in `tool_text_edit.rs` to include file content.

* Add AST indexing synchronization to text edit operations

* Refactor text editing tools and update tool descriptions

- Replace `&parameters` with `&my_parameters` in `src/restream.rs` for consistency.
- Add new `aux.rs` utility functions in `src/tools/file/`.
- Introduce modules `tool_create_textdoc.rs`, `tool_replace_textdoc.rs`, and `tool_update_textdoc.rs` in `src/tools/file/`.
- Update `tools_description.rs` definitions for new text document tools: `create_textdoc`, `replace_textdoc`, and `update_textdoc`.
- Remove old `tool_text_edit.rs` and related tests.
- Adapt customization guidelines in `customization_compiled_in.yaml` to use `*_textdoc()` functions.
- Ensure correct paths and imports in `mod.rs` files.

* Add ToolUpdateTextDocRegex for regex-based text replacements

Introduce a new tool, `ToolUpdateTextDocRegex`, to support document updates based on regular expression pattern replacements. This tool enhances the ability to modify text documents by allowing regex-based matches and replacements, enabling more flexible and complex text manipulation.

- Implement `ToolUpdateTextDocRegex` with necessary argument parsing and execution logic.
- Add `str_replace_regex` function to handle regex-based string replacements in files.
- Update `tools_description.rs` to include the new tool specifications.
- Modify `tool_update_textdoc` to use simple string replacements instead of regex.
- Adjust tool descriptions and agentic status for clarity and optimization.
- Ensure tools are properly registered and integrated into the existing framework.

* Remove outdated guidelines for tool calls and adjust temperature constant

* Remove tool_apply_edit and related components

Eliminate the tool_apply_edit code along with associated components, files, and configurations to streamline the codebase without affecting existing functionalities.

* This commit was made almost by agent

Add `rm` and `mv` tools for file manipulation

- Introduce `ToolRm` for deleting files and directories with options for recursion and dry-run.
- Implement `ToolMv` to move or rename files and directories, with a fallback for cross-device moves and an overwrite option.
- Update `tools_description.rs` to include descriptions and parameters for the new tools.
- Declare new modules `tool_rm` and `tool_mv` in `src/tools/mod.rs`.

* Remove deprecated diff and linter modules

Delete `apply_edit`, `diffs`, and `linters` modules from the project as they are no longer used. This includes removing associated imports, unused route definitions, and related code references. Additionally, make minor updates to logging and error handling in affected files.

* Remove test files for patch functionality

Removed test files related to patch functionality including:
- Test cases for rewriting symbols and file editing
- Example toad/frog implementation files used in tests
- Test runner for partial edit functionality
- Supporting test data files with various patch scenarios

* Normalize path handling and update result semantics

- Integrate `to_pathbuf_normalize` function across various files to standardize path normalization.
- Modify the `result` field from `MatchConfirmDenyResult::PASS` to `MatchConfirmDenyResult::CONFIRMATION` to better reflect the operation's intent.

* Remove 📍-notation reference and clean up example file

Removes outdated 📍-notation reference from tool_locate_search.rs and cleans up redundant example message from links.sh test file.

* Refactor file editing tools and simplify diff chunk generation

Reorganized file editing tools under a new `file_edit` module and simplified the diff chunk generation logic:
- Moved file editing tools from `tools/file` to `tools/file_edit` directory
- Simplified diff chunk generation by removing intermediate DiffLine/DiffBlock structs
- Improved error messages for token budget limitations in chat passthrough
- Updated all relevant import paths to reflect the new module structure

* Update tool descriptions and parameter names for clarity

Refine the descriptions of text document editing tools to highlight their specific use cases, ensuring clearer guidance on when to use each tool. Rename parameters in `tool_replace_textdoc.rs` for better accuracy and consistency with the updated tool descriptions.

* Add file edit dry-run feature and refactor tools with dry-run support

- Introduce a new HTTP endpoint `/file_edit_tool_dry_run` to handle dry-run requests for file editing tools.
- Refactor file editing tools (`create_textdoc`, `replace_textdoc`, `update_textdoc`, `update_textdoc_regex`) to support dry-run capability.
- Extract core execution logic into separate functions that accept a `dry` parameter to control whether changes are actually applied or simulated.
- Add `DiffChunk` support across relevant tool execution paths to provide detailed change information for dry-runs.
- Change module visibility for `tool_*` modules in `mod.rs` to public to allow access from the new dry-run feature.

* single-line completion fix (#583)

* Reduce temperature values (initial: 0.2 -> 0.0, no-cache: 0.6 -> 0.5) and remove newline stop token for multiline inputs to improve completion consistency.

* Add new finish reason and improve logging in code completion

Add the "stop-eot" variant to `FinishReason::Stop` mapping in `scratchpad_abstract.rs`. Enhance logging in `code_completion_replace.rs` to issue a warning when a completion is refused due to absence of a code block in the model response, aiding in better debugging and understanding of edge cases.

* Add metadata support check and update handling logic

- Introduce a check for metadata support by calling `is_metadata_supported` in `restream.rs`, affecting the processing flow based on metadata availability.
- Modify `forward_to_openai_endpoint.rs` to rely on `is_metadata_supported` for setting headers instead of conditionally using metadata presence.
- Adjust code completion logic in `code_completion_replace.rs` by trimming cursor line whitespace and updating stop token handling for non-multiline inputs.

* fix: remove '\n' as a stop token in singleline completion

* add comments

---------

Co-authored-by: hamzahasann <[email protected]>

* more readable condition

* pass slice instead of reference to Vec

* collapse else { if cond {} } to else if cond {}

* no need to have 2 copies, we can just move

* pass slice instead of reference to Vec

* reorder to avoid cloning a string
also avoid a completely unnecesary clone of a bool

* reorder to avoid unnecesary clone

* avoid cloning all messages again

* fix: end_str previously was being empty when it shouldn't

* fix: declare line_str before

* delete confusing comment

* readability over performance

* Implement follow-up message generation and topic change detection

- Update the logic for generating follow-up messages and identifying topic changes in conversations.
- Introduce a new struct `FollowUpResponse` to encapsulate follow-ups and topic change status.
- Enhance the `generate_follow_up_message` function to return detailed information using `FollowUpResponse`.
- Modify `_make_conversation` to format conversation history for model input.
- Adjust parameters in `subchat_single` call for improved response handling.
- Update V1 links router to utilize new follow-up message data, reflecting potential new chat suggestions.

* Limit processed chat messages to the last 10 and double token limit in follow-up response generation

* Fix message iteration order in history generation function

Change the iteration order to reverse the entire messages vector first before taking the first 10 entries. This ensures the latest messages are included in the history message display.

* MCP: setup values should arrive now

* MCP session coroutines and stuff

* MCP can shutdown processes

* fix: if threadMode is AGENT or THINKING_AGENT, returning generic AGENT mode for /v1/links request to prevent invalidation

* chore: remove console statement

* git init link impl

* Remove unused imports and comment out unused Git initialization logic

* fix: merge to pathbuf normalize and canonical path

Now it is permissive in windows, and works with strange windows prefixes, any amount of / or \, and long paths, in Unix it still does the same

* test: windows normalization logic

* fix: only import windows necessary types in windows

* fix: absolute paths not touching filesystem works on linux

* fix: replace to pathbuf normalize for canonical path

* Feature: Suggestion popup to open a new chat (#331)

* feat: suggestion UI implemented

* fix: better animation and styling

* feat: getting new_chat_suggestion flag from LSP binary & handling its logic on client side

* fix: updated fixtures for tests and stories

* fix: extracted animation styles logic into css modules

* fix: not allowing LSP to override new_chat_suggested flag from true to false

* chore: delete old SuggestNewChat.tsx

* fix: mention o3-mini as reasoning model in switch

* new qwen25 models with tool usage

* mistral small model with tool use

* fix: show mcp error to the model

* fix: add warning to use npx.cmd and npm.cmd in Windows

* label

* fix(prompt): simplified prompt so gpt-4o-mini can understand correctly if the topic has been changed

* - use shell escape for cmd tool
- remove duplicate filenames in cat tool (ui)

* stronger escape for powershell in cmdtool

* deps

* Create refact.yaml

endpoints for refact selfhost.
docker run -d --rm -p 8008:8008 -v perm-storage:/perm_storage --gpus all smallcloud/refact_self_hosting

* rename to bring_your_own_key/refact_self_hosting.yaml

* move everything to refact-agent/

* move rustfmt.toml

* move everything over to refact-server

* move away .github

* delete integrations.d for now

* move all files to refact-agent/gui

* move rust to engine/

* no "husky install"

* add basic cicd stuff

* disable test

* fix uploading

* quickfix for test13_choredb

* fix double build of server

* fix vecdb and stats in case of insecure https connection, add notes for the future development

* quickfix of stats table

* debug session 1

* less messages

* chore(chaT): sync with changes to alpha, include new patches.

* fix(git ignore): git was ignoring __fixtures__ and __tests__ directories.

* chore(chat): update repository url in package.jsson

* fix(chat)): opening an old chat from history without the newer `suggested_chat` property. (#511)

* Enable reasoning support for models and remove filtering in hook

* Improve error messages in file_edit tools for better clarity

* fix: check if path is absolute for create textdoc before canonicaliza… (#515)

* fix: check if path is absolute for create textdoc before canonicalization

* fix: check for absolute before canonicalize in all text edit tools

* fix: static lsp in predictible path instead of configured, and create docker network if it does not exist

* fix: create network if not exist and get host cache dir

* fix: http request with retries so sync workspace can wait for http server to start

* from manuel: impersonate cosmopolitan to fix static build of sqlite vec

* fix: move dockerignore to engine, since refact-lsp static binary is built from there

* oops. sleep only for debug, not needed now

* feat: allow `globally_allowed_integrations` to be set in integrations.yaml

* fix: include __init__.py

* fix: temp fix for auto generate cdp

* fix: replace async tar with tokio tar to not use different async environments

* fix engine build

* delete rudimental code

* fix: making usage limits for all users (#519)

* fix: making usage limits for all users

* fix: remove unused imports

* fix: hiding upgrade button if not FREE tier & messages adjusted

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* refactor: use git2 status show instead of redundant enum, allow to get diff status of all changes, diff from workdir instead of creating index

* uncommited changes warning message separating unstaged and staged

* remove unused method

* fix: uncommited changes warning, failed integrations links and more should be present also for thinking agent mode

* fix: add usage also for delta collector in streaming in python sdk

* fix: count cache tokens for claude

* fix: increase stream limit

* fix: secrets yaml was not used

* ci(npm publish): better version bump message (#523)

* fix: showing usable models if user's plan is not FREE (#522)

* feat: version bump [email protected] (#525)

* feat: version bump [email protected] (#526)

* feat: version bump [email protected]

* chore: update package-lock.json

* Ci/publish npm fixes (#528)

* ci: create PR instead of direct push

* ci: better PR body text

* ci: pushing to the branch itself instead of PR :/

* ci: use GH_USER to authorize in CI workflow

* Version bump [email protected]

* ci: remove test conditions & rollback package.json package-lock.json

* chore: rollback package.json

* chore: remove early exit 0

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* UI fixes 19 02 25 (#509)

* ordered code_completion_models and code_chat_models

* pass default system prompt into UI

* chore: fix prettier errors

* fix: tool use changing based on if models support tools and agent & fixes for types and stubs in caps

* fix: proper checks for default system prompt

* fix: interacted state for switching tool use manually

* fix: setting local state for first tool use set if no models, then user can click and change tool use

* fix: setting wasAdjusted even if no tool use prederermined

---------

Co-authored-by: alashchev17 <[email protected]>

* chore: version bump, [email protected]

---------

Co-authored-by: Oleg Klimov <[email protected]>
Co-authored-by: Dimitry Ageev <[email protected]>
Co-authored-by: V4LER11 <[email protected]>
Co-authored-by: Humberto Yusta <[email protected]>
Co-authored-by: JegernOUTT <[email protected]>
Co-authored-by: Kirill Starkov <[email protected]>
Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: hamzahasann <[email protected]>
Co-authored-by: MDario123 <[email protected]>
Co-authored-by: ukrolelo <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
mitya52 added a commit that referenced this pull request Feb 25, 2025
* update settings schema for MCP

* make MCP experimental

* remove 1 dep

* chore: better wording

* fix: hotfix for getThreadMode

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* feat: MCP args/envs tables & proper parsing of field type

* feat: validating MCP args/envs & sending them to the LSP on form submit

* fix(mcp envs): store original order of object props while renaming keys might affect ordering

* chore: remove unnecessary comments

* fix: avoid duplicative code & validate for specific RegExp on form change to disable it

* fix: avoid type cast and use type guards instead

* fix(types/regexp): fix type check for CI & regexp

* chore: adjusted typeguard to avoid type casting

* fix: showing 'No content' if file content is undefined

* fix(trim indent): fixed tests

* chore: return undefined instead of void 0

* fix: disable revert checkpoints button if waiting, streaming or not online

* fix: blacklisted dirs excluded from all repos + refactor open shadow repos to only one method

* fix: do not create abs paths if they are not going to be used, speed improvements for checkpoints

* refactor: rename method

* vllm serve (#581)

* WIP: this commit for the test only, models list will be updated later

* other models

* upd models list, temporary available tools for llama 3.2 models

* add deepseek-r1-distill vllm models

* drop tools support for llama

* oleg chore database and mem database

* iter1: vecdb without lance

* iter2: vecdb without lance

* iter3: vecdb without lance debug

* iter3: vecdb without lance debug2

* rm mem-query
add mem-upd
fixed some bugs

* add vec status to the pubsub sse pipeline

* Remove trailing comma in SQL query to fix syntax error

* init: move compression logic into handler

* trajectory save in memdb

* save traj only

* Add trajectory identifier "local-compressed-traj" in chat handler and update compress_trajectory function to accept an optional vector type.

* Remove unused dependencies from Cargo.toml

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Update dependencies and refactor zerocopy usage

- Add and update several dependencies in Cargo.toml for improved functionality
- Replace `zerocopy::AsBytes` with `zerocopy::IntoBytes` to align with updated library usage in `knowledge.rs` and `vdb_sqlite.rs`

* Remove redundant protobuf installation steps from workflows and Dockerfile

* Add vdb_emb_aux module for managing embeddings tables

Introduce a new module `vdb_emb_aux` to handle the management of embeddings tables, including creating unique table names and cleaning up old tables based on their creation timestamps. Implement functions to generate table names using workspace folder hashes, parse table timestamps, retrieve all embedding tables, and delete outdated tables asynchronously. Modify existing code to integrate the new module functionality.

* Implement per-workspace embedding tables with auto-cleanup

Refactored the vector database to support multiple embedding tables per workspace:
- Renamed `create_embeddings_table_name` to `create_emb_table_name` for consistency
- Added table name management in VecDBSqlite and MemoriesDatabase
- Implemented automatic cleanup of old embedding tables based on age and count
- Added configurable retention policy (7 days, max 10 tables)
- Updated all SQL queries to use workspace-specific table names

* Standardize column data types in SQLite virtual table creation

* Add new parameters to compress_trajectory function calls

Updated function calls in autonomy.rs and compress_trajectory.rs to include two new parameters:
an optional value (None) and a boolean flag (true) to maintain compatibility with updated function signature.

* Enable `serde` feature for `chrono` dependency in Cargo.toml

* - Add memdb sleeping point notification during shutdown
- Fix memdb pubsub polling to respect shutdown flag
- Remove old triggers before migration
- Clean up debug logging and improve error messages
- Fix error display format in subchat network error handling

* force http2 support in axum

* fixes issue when chat was iterrupted in the middle of a tool call: tool was called, but results did not arrive -- caused critical litellm error

* fixes

* fix: checkpoints work in nested repos

* feat: support for nested shadow repos is working, refactor nested repos logic to separate methods, faster way to know if file is submodule

* refactor: remove unused untracked flag and move enum to module level and create shadow repo in a method

* Add tool preservation in trajectory compression

* wip: getting icons from the binary

* feat: using icons from lsp and using terminal icon for all cmdline/service/mcp integrations

* fix(cloud login): set address url when logging in through cloud (#329)

* feat(telemetry): sending telemetry for agent rollback actions

* 2.0.5-alpha.3

* fix: ask model to write 🧩EDITOR in a new line

* feat(patches and diffs): track patch and diff result to send to the ide. (#332)

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333)

* ui: hide uncommitted changes warning when the info or error callout is one screen. (#334)

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* feat: preview first, then apply & error handling

* chore: fixed types in fixtures & stories

* 2.0.5-alpha.4

* fix(callout retry loop): don't retry automatically when dismising the error message, and validate tool_calls on abort or error. (#333) (#337)

Conflicts:
	src/components/ChatForm/ChatForm.tsx
	src/features/Chat/Thread/reducer.ts

 Changes to be committed:
	modified:   src/components/ChatForm/ChatForm.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/services/refact/types.ts

* 2.0.5

* Knowledge db (#196)

* wip: thread stream.

* wip(chat-db): add middleware to connect to db and get threads.

* fix(jb images): remove "add image" button from jetbrains. (#211)

* fix(jb images): remove "add image" button from jetbrains.

* fix(jb images): make `images` a configurable feature.

* wip(knowledge): add sub end point.

* wip(knowlage db): handle insert, update and delete operations.

* wip(memories): add a basic ui for rendering memories.

* wip(knowledge): add create, delete and search services.

* wip(knowledge): add url for updating usage.

* wip(knowledge): add the knowledge page to the sidebar.

* wip(knowledge): add a basic form for adding knowledge.

* wip(knowledge form): add back button.

* wip(knowledge): add back in listAll and add a scroll area to memories list.

* wip(knowledge): list all and subscribe

* wip(knowledge): add delete functionality.

* ui(knowledge): change the orientation of the data-list depending on size

* wip(knowledge list): remove properties the user doesn't need to see from the data list.

* ui(knowledge list): remove data list and use `m_goal` as the title and `payload` as content.

* feat(knowledge): add a like button.

* ui(thumb): change like button from tick to thumb.

* refactor(knowledge): remove project, type and origin from add knowledge form

* refactor(knowledge): remove `mem-list` endpoint.

* feat(knowledge): hide behind a feature flag.

* feat(feature menu): add a hidden feature menu.

* wip(knowledge): add the ability to edit knowledge.

* fix(feature menu): only allow the code to be entered when nothing if focused.

* wip(knowledge search): add comments and rough search handler

* feat(knowledge): add quick search and fix features usage

* fix(features): add links to setting for features set in settings.

* chore*knowledge): fix linter warnings

* wip(knowledge): add `mem-upd` handler for updating memroies.

* wip(knowledge): add status to subscription payload.

* wip(knowledge): add vectorisation status information.

* wip(knowledge): animate db button while parsing.

* wip(knowledge): debouce search and cache vecdb status.

* refactor(knowledge): move components to separate files.

* ui(knowledge): add titles to the forms.

* ui(knowledge): add padding to items so the scroll bar isn't over the boarder

* linter: allow log for unsupproted type in knowledge stream.

* fix(knowledge): don't wait for consumeStream to resolve, this allows the stream to hangup.

* fix: refetch button if counter state is disaligned on frontend with inference

* fix: user.refetch instead of reset of API state

* fix: updating state of agent usage on refetch of user

* fix: void expression for async refetchUser

* 2.0.3-alpha.25

* 2.0.3

* feat(knowledge): create knowledge from chat.

* wip(knowledge): add a reducer and event listener for the current project name to pass to "/v1/trajectory-save".

* wip(knowledge): export active_project types for vscode.

* fix(knowledge): if the chat is an integration use the project from the integration data.

* wip(knowledge): add a story with a knowledge tool call.

* wip(knowledge): add basic ui for updating knowledge useage.

* fix(knowledge): hang up on unmount.

* wip(knowledge): move subscribe to a thunk so it can hangup requests.

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* 2.0.4-alpha.4

* 2.0.4

* 2.0.5-alpha.0

* Feat: Agent Capabilities (#321)

* feat: better controls for agentic features

* wip(chat-db): add knowledge sub thunk.

* fix: clear memery when make a new request

* wip(knowledge): move search to a thunk.

* Login rework (#320)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* wip(login): add un-themed accordion.

* wip(accordion): light mode style

* wip(accordion): support light and dark mode.

* ui(accordion): use theme colour.

* wip(login): add basic ui for login page.

* ui(login): add padding to the container for the login page.

* wip(login): add msw handlers for story book.

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* wip(email login): add hooks and msw interception for storybook

* ui(login): small ui adjustments.

* wip(login): handle canceling email polling.

* fix(email login): remember to set api key on success.

* wip(login): send setup host event to ide.

* fix(email login redirect): quick fix, will need to look closer at App.tsx routing.

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* wip(login): remove old login pages.

* feat: better controls for agentic features

* test(start enw chat): for some reason stubResizeObserver wasn't being called :/

* wip(login): add provider icons.

* refactor(agent usage): move usage update to getUser hook so email login updates the usage.

* ui(login): add title.

* fix(email message): add missing hooks.

* fix(console.log): remove console log.

* ui(login): fix ui jumping when changing text.

* ui(login): allow all items to be collapsed.

* ui(login): remove text changes because of jumps.

---------

Co-authored-by: alashchev17 <[email protected]>

* refactor: remove old chat-db code.

* fix: preventing user from re-navigation, if history, welcome or chat pages are already in pages history

* Feature: Deepseek Reasoning support (#312)

* 2.0.4-alpha.0

* fix(caps): refetch caps on mount or arg change. (#307)

* fix: unified limit exhausted message across app & adjusted text

* fix: better wording

* 2.0.4-alpha.1

* fix: updated offline message

* fix: increased size for input field

* fix: if only one chat tab left and active tab is dashboard, allowing click on chat tab

* feat: upgrade to pro button in main dropdown & reworked links in dropdown

* fix: show plugin settings if jetbrains, otherwise extension settings

* chore: revert deletion of integrations

* chore: revert deletion of integrations

* fix: startup keyword shouldn't be null

* wip(updated tour): integrations step & updated refs

* feat: updated onboarding with new data & small adjustments to the UI

* 2.0.4-alpha.2

* feat: THINKING_AGENT mode support for deepseek-reasoning model

* wip(checkpoints): ui for popup and user input

* wip(checkpoints): truncation of links for files

* wip(checkpoints): storing checkpoints for user messages

* wip(checkpoints): API handler, typeguards, saving restore results to store and fixed fixtures

* wip(checkpoints): fixed types issue

* wip(checkpoints): fix of tests

* wip(checkpoints): stubs for checkpoints & storybook

* feat(checkpoints): undo functionality & refactoring

* chore: fixed types for CI

* refactoring(checkpoints): extracted logic and functions to useCheckpoints hook

* chore: parsing error text adjusted

* fix: make checkpoints optional & hiding revert changes button if there are no checkpoints

* fix: support esc key press & click out of the dialog to close it

* chore: removed convertUTCToLocalTime() util

* fix: remove hardcoded locale en-GB to use system one

* feat: reworked logic & improved UI/UX

* chore: better wording with dates

* fix: checking for index of of current message instead of checking for user messages amount

* fix(onboarding): updated GIF and links for final screen

* fix: updated tour ending

* 2.0.4-alpha.3

* fix: fixed validation of paths for puzzle links on Windows, adjusted texts

* improve(puzzle_links): extractLinkFromPuzzle unit tests coverage

* fix: tour blinking on restart & typos & unified titles for buttons & removed conditions for set up integrations button

* feat: better controls for agentic features

* feat: showing deepseek reasoner option only for PRO users, placing it in a correct place of all agentic features

* chore: fix component file from merge conflicts

* feat: better wording & hiding agent features if restored thread tool use is not agent

* chore: better semantic name for reasoning switch component

* fix: useGetUser to get user instead of outdated useLogin

* 2.0.5-alpha.1

* ui(knowledge): move like button to bottom of last assistant message.

* fix: cut off for mock data in agent rollback

* 2.0.5-alpha.2

* wip(knowledge): make tool button look nicer.

* wip(knowledge): add spacing around tool content.

* wip(knowledge): add msw handler for updating usage.

---------

Co-authored-by: alashchev17 <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>

* 2.0.5-alpha.5

* 2.0.6-alpha.0

* fix(package-lock): fix merge conflicts.

* fix(package-lock): merge conflicts.

* fix(vscode): `Cannot find module 'redux-persist/es/persistReducer' or its corresponding type declarations` this shouldn't be exported. (#339)

* 2.0.6-alpha.1

* fix: support for new textdoc tools from LSP

* fix: include text_edit tool to list of all patch-like tools

* chore: removed duplicate hot keys option in main dropdown

* fix: make reasoner switch available for FREE tier users

* chore: reasoning listed if user is on FREE tier

* fix: unnecesary lock maintained for long time

* add validation for parameters of integration

* 2.0.6

* chore: bump version to 2.0.7-alpha.1

* fix: filtered out o3-mini from models list

* 2.0.7

* hotfix: rollback disabled for thinking

* 0.10.12

* feat: support http get like http post for internal requests

* check if confirmation needed works inside container

* ask list of tools from remote

* fix: proper filter out tools

* fix: proper path escapes and linux-like container path handling even while on windows

* fix: use shell quote instead of \", add secrets yaml and not just variables, and fix url from file path

* refactor: methtod to copy to container with shell escape and fix with url from file in windows

* init implementation of blocklist mechanism

* additional_indexing_dirs and fixes

* _ls_files_under_version_control_recursive for additional indexing dirs, added blacklist check for dirs without vcs

* WorkspaceIndexingSettings -> GlobalIndexingSettings + return on shut down

* rename

* default indexing yaml

* move to glob from directory name matching

* rename, move things around, rewrite comments

* more renames

* more renames, "how it works" in comments

* almost works, now pattern matching is wrong

* additional_indexing_dirs works

* make DEFAULT_BLOCKLIST_DIRS a base to add to

* refactor: indexing for path taking ref not pathbuf

* make ignore rules appropiate based on blocklist settings

* change approach for rollback to preview -> apply instead of apply -> undo

Now there are two separate endpoints: /checkpoints-preview and /checkpoints-restore

Unified way to open repos and nested repos

* fix: unnecesary lock maintained for long time

* TODO in blocklist

* feat: updating integration availability values on switch click from general integrations view page

* feat: error handling & better styling & better code structure

* fix: handling form fields change in better way

* Refactor patch tool to apply_tickets and update related modules

- Rename `tool_patch` to `tool_apply_tickets` for clarity.
- Update functions and variables to use the new module name.
- Change ticket actions from `REWRITE_ONE_SYMBOL` to `REPLACE_SYMBOL`, `REWRITE_WHOLE_FILE` to `REPLACE_FILE`, `PARTIAL_EDIT` to `SECTION_EDIT`.
- Adjust related documentation, tests, and configuration for consistency with new naming conventions.
- Remove unused `locate_as` feature and refactor dependencies accordingly.

* Refactor apply_tickets tool to handle single ticket at a time

Simplified the ticket application workflow by processing one ticket at a time instead of batches. Changes include:
- Renamed tool from `apply_tickets` to `apply_ticket` to reflect single-ticket focus
- Updated API endpoint to accept single `ticket_id` instead of array
- Refactored ticket validation and processing to handle individual tickets
- Updated tool description and usage messages throughout codebase
- Renamed related modules and updated imports

* Rename tool from `apply_ticket` to `apply_edit` for better clarity

* Remove redundant word "any" from project change proposal step in YAML config

* Add handling for PatchAction::DeleteFile in tool_apply_edit.rs

Implement `PatchAction::DeleteFile` to support file removal within the `tool_apply_edit.rs`, ensuring consistent handling of file operations.

* Replace legacy `patch()` with `apply_edit()` and `REPLACE_FILE` with `s` to align with current tool syntax standards in the customization configuration file.

* Replace apply_edit tool with text_edit for file manipulation

Introduces a new text_edit tool that provides direct file manipulation capabilities with two commands:
- `create`: Creates new files with specified content
- `str_replace`: Performs exact string replacements in existing files

The tool includes improved error handling and validation, replacing the previous pin-based editing approach. Updated customization_compiled_in.yaml to reflect the new editing workflow.

* Add `file_replace` command and improve text edit tool feedback

- Added new `file_replace` command alongside existing `create` and `str_replace` commands
- Enhanced text edit tool to return diff chunks instead of simple confirmation message
- Modified command execution to return before/after text content for diff generation
- Updated parameter descriptions in tools documentation
- Fixed scratchpad module to use correct tool name 'apply_edit' instead of 'patch'

* 1. Add `replace_multiple` parameter to text_edit tool to allow replacing multiple occurrences of a string at once
2. Enhance logging in restream.rs by showing full value string instead of truncated version
3. Update text_edit tool description to be more concise and mark it as non-agentic
4. Simplify customization instructions by removing unnecessary prompts and clarifying tool usage

* Normalize line endings during string replacement operations

* Add unit tests for text_edit tool and update usage guidelines

* Update terms for ticket descriptions and coding actions

* Enhance file_manager command description with guidance on str_replace usage

* Refactor and enhance error handling for tool call processing

- Extract a `reply` function to streamline response creation.
- Replace `yield` log with more informative log entries.
- Introduce `_replace_broken_tool_call_messages` to handle invalid tool calls.
- Adjust function names for clarity and expand imports for `HashMap`.
- Improve error messaging in `tool_text_edit.rs` to include file content.

* Add AST indexing synchronization to text edit operations

* Refactor text editing tools and update tool descriptions

- Replace `&parameters` with `&my_parameters` in `src/restream.rs` for consistency.
- Add new `aux.rs` utility functions in `src/tools/file/`.
- Introduce modules `tool_create_textdoc.rs`, `tool_replace_textdoc.rs`, and `tool_update_textdoc.rs` in `src/tools/file/`.
- Update `tools_description.rs` definitions for new text document tools: `create_textdoc`, `replace_textdoc`, and `update_textdoc`.
- Remove old `tool_text_edit.rs` and related tests.
- Adapt customization guidelines in `customization_compiled_in.yaml` to use `*_textdoc()` functions.
- Ensure correct paths and imports in `mod.rs` files.

* Add ToolUpdateTextDocRegex for regex-based text replacements

Introduce a new tool, `ToolUpdateTextDocRegex`, to support document updates based on regular expression pattern replacements. This tool enhances the ability to modify text documents by allowing regex-based matches and replacements, enabling more flexible and complex text manipulation.

- Implement `ToolUpdateTextDocRegex` with necessary argument parsing and execution logic.
- Add `str_replace_regex` function to handle regex-based string replacements in files.
- Update `tools_description.rs` to include the new tool specifications.
- Modify `tool_update_textdoc` to use simple string replacements instead of regex.
- Adjust tool descriptions and agentic status for clarity and optimization.
- Ensure tools are properly registered and integrated into the existing framework.

* Remove outdated guidelines for tool calls and adjust temperature constant

* Remove tool_apply_edit and related components

Eliminate the tool_apply_edit code along with associated components, files, and configurations to streamline the codebase without affecting existing functionalities.

* This commit was made almost by agent

Add `rm` and `mv` tools for file manipulation

- Introduce `ToolRm` for deleting files and directories with options for recursion and dry-run.
- Implement `ToolMv` to move or rename files and directories, with a fallback for cross-device moves and an overwrite option.
- Update `tools_description.rs` to include descriptions and parameters for the new tools.
- Declare new modules `tool_rm` and `tool_mv` in `src/tools/mod.rs`.

* Remove deprecated diff and linter modules

Delete `apply_edit`, `diffs`, and `linters` modules from the project as they are no longer used. This includes removing associated imports, unused route definitions, and related code references. Additionally, make minor updates to logging and error handling in affected files.

* Remove test files for patch functionality

Removed test files related to patch functionality including:
- Test cases for rewriting symbols and file editing
- Example toad/frog implementation files used in tests
- Test runner for partial edit functionality
- Supporting test data files with various patch scenarios

* Normalize path handling and update result semantics

- Integrate `to_pathbuf_normalize` function across various files to standardize path normalization.
- Modify the `result` field from `MatchConfirmDenyResult::PASS` to `MatchConfirmDenyResult::CONFIRMATION` to better reflect the operation's intent.

* Remove 📍-notation reference and clean up example file

Removes outdated 📍-notation reference from tool_locate_search.rs and cleans up redundant example message from links.sh test file.

* Refactor file editing tools and simplify diff chunk generation

Reorganized file editing tools under a new `file_edit` module and simplified the diff chunk generation logic:
- Moved file editing tools from `tools/file` to `tools/file_edit` directory
- Simplified diff chunk generation by removing intermediate DiffLine/DiffBlock structs
- Improved error messages for token budget limitations in chat passthrough
- Updated all relevant import paths to reflect the new module structure

* Update tool descriptions and parameter names for clarity

Refine the descriptions of text document editing tools to highlight their specific use cases, ensuring clearer guidance on when to use each tool. Rename parameters in `tool_replace_textdoc.rs` for better accuracy and consistency with the updated tool descriptions.

* Add file edit dry-run feature and refactor tools with dry-run support

- Introduce a new HTTP endpoint `/file_edit_tool_dry_run` to handle dry-run requests for file editing tools.
- Refactor file editing tools (`create_textdoc`, `replace_textdoc`, `update_textdoc`, `update_textdoc_regex`) to support dry-run capability.
- Extract core execution logic into separate functions that accept a `dry` parameter to control whether changes are actually applied or simulated.
- Add `DiffChunk` support across relevant tool execution paths to provide detailed change information for dry-runs.
- Change module visibility for `tool_*` modules in `mod.rs` to public to allow access from the new dry-run feature.

* single-line completion fix (#583)

* Reduce temperature values (initial: 0.2 -> 0.0, no-cache: 0.6 -> 0.5) and remove newline stop token for multiline inputs to improve completion consistency.

* Add new finish reason and improve logging in code completion

Add the "stop-eot" variant to `FinishReason::Stop` mapping in `scratchpad_abstract.rs`. Enhance logging in `code_completion_replace.rs` to issue a warning when a completion is refused due to absence of a code block in the model response, aiding in better debugging and understanding of edge cases.

* Add metadata support check and update handling logic

- Introduce a check for metadata support by calling `is_metadata_supported` in `restream.rs`, affecting the processing flow based on metadata availability.
- Modify `forward_to_openai_endpoint.rs` to rely on `is_metadata_supported` for setting headers instead of conditionally using metadata presence.
- Adjust code completion logic in `code_completion_replace.rs` by trimming cursor line whitespace and updating stop token handling for non-multiline inputs.

* fix: remove '\n' as a stop token in singleline completion

* add comments

---------

Co-authored-by: hamzahasann <[email protected]>

* more readable condition

* pass slice instead of reference to Vec

* collapse else { if cond {} } to else if cond {}

* no need to have 2 copies, we can just move

* pass slice instead of reference to Vec

* reorder to avoid cloning a string
also avoid a completely unnecesary clone of a bool

* reorder to avoid unnecesary clone

* avoid cloning all messages again

* fix: end_str previously was being empty when it shouldn't

* fix: declare line_str before

* delete confusing comment

* readability over performance

* Implement follow-up message generation and topic change detection

- Update the logic for generating follow-up messages and identifying topic changes in conversations.
- Introduce a new struct `FollowUpResponse` to encapsulate follow-ups and topic change status.
- Enhance the `generate_follow_up_message` function to return detailed information using `FollowUpResponse`.
- Modify `_make_conversation` to format conversation history for model input.
- Adjust parameters in `subchat_single` call for improved response handling.
- Update V1 links router to utilize new follow-up message data, reflecting potential new chat suggestions.

* Limit processed chat messages to the last 10 and double token limit in follow-up response generation

* Fix message iteration order in history generation function

Change the iteration order to reverse the entire messages vector first before taking the first 10 entries. This ensures the latest messages are included in the history message display.

* MCP: setup values should arrive now

* MCP session coroutines and stuff

* MCP can shutdown processes

* fix: if threadMode is AGENT or THINKING_AGENT, returning generic AGENT mode for /v1/links request to prevent invalidation

* chore: remove console statement

* git init link impl

* Remove unused imports and comment out unused Git initialization logic

* fix: merge to pathbuf normalize and canonical path

Now it is permissive in windows, and works with strange windows prefixes, any amount of / or \, and long paths, in Unix it still does the same

* test: windows normalization logic

* fix: only import windows necessary types in windows

* fix: absolute paths not touching filesystem works on linux

* fix: replace to pathbuf normalize for canonical path

* Feature: Suggestion popup to open a new chat (#331)

* feat: suggestion UI implemented

* fix: better animation and styling

* feat: getting new_chat_suggestion flag from LSP binary & handling its logic on client side

* fix: updated fixtures for tests and stories

* fix: extracted animation styles logic into css modules

* fix: not allowing LSP to override new_chat_suggested flag from true to false

* chore: delete old SuggestNewChat.tsx

* fix: mention o3-mini as reasoning model in switch

* new qwen25 models with tool usage

* mistral small model with tool use

* fix: show mcp error to the model

* fix: add warning to use npx.cmd and npm.cmd in Windows

* label

* fix(prompt): simplified prompt so gpt-4o-mini can understand correctly if the topic has been changed

* - use shell escape for cmd tool
- remove duplicate filenames in cat tool (ui)

* stronger escape for powershell in cmdtool

* deps

* Create refact.yaml

endpoints for refact selfhost.
docker run -d --rm -p 8008:8008 -v perm-storage:/perm_storage --gpus all smallcloud/refact_self_hosting

* rename to bring_your_own_key/refact_self_hosting.yaml

* move everything to refact-agent/

* move rustfmt.toml

* move everything over to refact-server

* move away .github

* delete integrations.d for now

* move all files to refact-agent/gui

* move rust to engine/

* no "husky install"

* add basic cicd stuff

* disable test

* fix uploading

* quickfix for test13_choredb

* fix double build of server

* fix vecdb and stats in case of insecure https connection, add notes for the future development

* quickfix of stats table

* debug session 1

* less messages

* chore(chaT): sync with changes to alpha, include new patches.

* fix(git ignore): git was ignoring __fixtures__ and __tests__ directories.

* chore(chat): update repository url in package.jsson

* fix(chat)): opening an old chat from history without the newer `suggested_chat` property. (#511)

* Enable reasoning support for models and remove filtering in hook

* Improve error messages in file_edit tools for better clarity

* fix: check if path is absolute for create textdoc before canonicaliza… (#515)

* fix: check if path is absolute for create textdoc before canonicalization

* fix: check for absolute before canonicalize in all text edit tools

* fix: static lsp in predictible path instead of configured, and create docker network if it does not exist

* fix: create network if not exist and get host cache dir

* fix: http request with retries so sync workspace can wait for http server to start

* from manuel: impersonate cosmopolitan to fix static build of sqlite vec

* fix: move dockerignore to engine, since refact-lsp static binary is built from there

* oops. sleep only for debug, not needed now

* feat: allow `globally_allowed_integrations` to be set in integrations.yaml

* fix: include __init__.py

* fix: temp fix for auto generate cdp

* fix: replace async tar with tokio tar to not use different async environments

* fix engine build

* delete rudimental code

* fix: making usage limits for all users (#519)

* fix: making usage limits for all users

* fix: remove unused imports

* fix: hiding upgrade button if not FREE tier & messages adjusted

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* refactor: use git2 status show instead of redundant enum, allow to get diff status of all changes, diff from workdir instead of creating index

* uncommited changes warning message separating unstaged and staged

* remove unused method

* fix: uncommited changes warning, failed integrations links and more should be present also for thinking agent mode

* fix: add usage also for delta collector in streaming in python sdk

* fix: count cache tokens for claude

* fix: increase stream limit

* fix: secrets yaml was not used

* ci(npm publish): better version bump message (#523)

* fix: showing usable models if user's plan is not FREE (#522)

* feat: version bump [email protected] (#525)

* feat: version bump [email protected] (#526)

* feat: version bump [email protected]

* chore: update package-lock.json

* Ci/publish npm fixes (#528)

* ci: create PR instead of direct push

* ci: better PR body text

* ci: pushing to the branch itself instead of PR :/

* ci: use GH_USER to authorize in CI workflow

* Version bump [email protected]

* ci: remove test conditions & rollback package.json package-lock.json

* chore: rollback package.json

* chore: remove early exit 0

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* UI fixes 19 02 25 (#509)

* ordered code_completion_models and code_chat_models

* pass default system prompt into UI

* chore: fix prettier errors

* fix: tool use changing based on if models support tools and agent & fixes for types and stubs in caps

* fix: proper checks for default system prompt

* fix: interacted state for switching tool use manually

* fix: setting local state for first tool use set if no models, then user can click and change tool use

* fix: setting wasAdjusted even if no tool use prederermined

---------

Co-authored-by: alashchev17 <[email protected]>

* chore: version bump, [email protected]

---------

Co-authored-by: Oleg Klimov <[email protected]>
Co-authored-by: Dimitry Ageev <[email protected]>
Co-authored-by: V4LER11 <[email protected]>
Co-authored-by: Humberto Yusta <[email protected]>
Co-authored-by: JegernOUTT <[email protected]>
Co-authored-by: Kirill Starkov <[email protected]>
Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: hamzahasann <[email protected]>
Co-authored-by: MDario123 <[email protected]>
Co-authored-by: ukrolelo <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
olegklimov pushed a commit that referenced this pull request Feb 25, 2025
)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
MarcMcIntosh added a commit that referenced this pull request Feb 26, 2025
 interactive rebase in progress; onto c7e90e9
 Last commands done (14 commands done):
    pick 6989755 fix: don't continue streaming if the user rejects the tool use.
    pick 54d83da ui(confirmation): remove loading dots.
 Next commands to do (9 remaining commands):
    pick 61aa130 ui(markdown): remove custom stye for update textdoc
    pick 332ac4c ci: update version bump logic for alpha branch & npm publish in CI (#508)
 Changes to be committed:
	modified:   refact-agent/gui/src/components/ChatContent/ChatContent.tsx
MarcMcIntosh pushed a commit that referenced this pull request Feb 26, 2025
)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
MarcMcIntosh added a commit that referenced this pull request Feb 26, 2025
* ui(patches): remove apply and replace buttons and make the code revealable.

* ui(new patches): remove new event for sending a patchto the ide.

* wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected.

* feat(chat): append tool call accepted message to chat when the user accepts the diff.

 interactive rebase in progress; onto 3efa513
 Last commands done (4 commands done):
    pick f1102ea wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected.
    pick a0dbf40 feat(chat): append tool call accepted message to chat when the user accepts the diff.
 Next commands to do (5 remaining commands):
    pick be1a614 wip(manual patch): remove the tool confiormation when manually applying patches.
    pick 7e4e644 fix: inconstancy with auto sending when accpetting or reject a patch multiple times.
 You are currently rebasing branch 'ui-patch-tool-changes' on '3efa5139'.

 Changes to be committed:
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForApp.ts
	modified:   refact-agent/gui/src/services/refact/types.ts

 Last commands done (4 commands done):
    pick 97d931b wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected.
    pick 7b5f40f feat(chat): append tool call accepted message to chat when the user accepts the diff.
 Next commands to do (19 remaining commands):
    pick 723aaa3 wip(manual patch): remove the tool confiormation when manually applying patches.
    pick 70dd139 fix: inconstancy with auto sending when accpetting or reject a patch multiple times.
 Changes to be committed:
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForApp.ts
	modified:   refact-agent/gui/src/services/refact/types.ts

* wip(manual patch): remove the tool confiormation when manually applying patches.

 Last commands done (5 commands done):
    pick 7b5f40f feat(chat): append tool call accepted message to chat when the user accepts the diff.
    pick 723aaa3 wip(manual patch): remove the tool confiormation when manually applying patches.
 Next commands to do (18 remaining commands):
    pick 70dd139 fix: inconstancy with auto sending when accpetting or reject a patch multiple times.
    pick b1b7910 fix(updating tool messages): handle multi model.
 Changes to be committed:
	modified:   refact-agent/gui/package.json
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/contexts/AbortControllers.tsx
	modified:   refact-agent/gui/src/features/ToolConfirmation/confirmationSlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForApp.ts

* fix: inconstancy with auto sending when accpetting or reject a patch multiple times.

* fix(updating tool messages): handle multi model.

* remove unused import.

* fix(apply): auto calls when user manually presses apply then accept/reject.

 You are currently rebasing branch 'ui-patch-tool-changes' on '3efa5139'.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

 Last commands done (9 commands done):
    pick 71bb762 remove unused import.
    pick cc24290 fix(apply): auto calls when user manually presses apply then accept/reject.
 Next commands to do (14 remaining commands):
    pick 36c5bcf fix(apply confirmation): add the correct message if the user accepts the result.
    pick cb56432 fix(acceot / reject): prevent sending message no rejection.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

* fix(apply confirmation): add the correct message if the user accepts the result.

* fix(acceot / reject): prevent sending message no rejection.

* fix: don't continue streaming if the user rejects the tool use.

* ui(confirmation): remove loading dots.

 interactive rebase in progress; onto c7e90e9
 Last commands done (14 commands done):
    pick 6989755 fix: don't continue streaming if the user rejects the tool use.
    pick 54d83da ui(confirmation): remove loading dots.
 Next commands to do (9 remaining commands):
    pick 61aa130 ui(markdown): remove custom stye for update textdoc
    pick 332ac4c ci: update version bump logic for alpha branch & npm publish in CI (#508)
 Changes to be committed:
	modified:   refact-agent/gui/src/components/ChatContent/ChatContent.tsx

* ui(markdown): remove custom stye for update textdoc

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* fix(chat): remove unused import.

* a different Stop message without confirmation

* fix(accept / reject): continue when accepting or rejecting the changes.

 Last commands done (19 commands done):
    pick ac80b1f a different Stop message without confirmation
    pick 2995aa6 fix(accept / reject): continue when accepting or rejecting the changes.
 Next commands to do (4 remaining commands):
    pick c792dcd refactor(ideToolCallResponse): remove chat id.
    pick 1ef2ea5 remove comment.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

* refactor(ideToolCallResponse): remove chat id.

* remove comment.

* fix(patch): continue if accepted or allow clicked, stop if rejected of stop clicked.

 Last commands done (22 commands done):
    pick 1ef2ea5 remove comment.
    pick 685f095 fix(patch): continue if accepted or allow clicked, stop if rejected of stop clicked.
 Next command to do (1 remaining command):
    pick 2cc7859 feat(apply + accept): send the chat when the recent tool result has been accepted in the ide.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForIDE.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

* feat(apply + accept): send the chat when the recent tool result has been accepted in the ide.

---------

Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
MDario123 pushed a commit that referenced this pull request Mar 6, 2025
* ui(patches): remove apply and replace buttons and make the code revealable.

* ui(new patches): remove new event for sending a patchto the ide.

* wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected.

* feat(chat): append tool call accepted message to chat when the user accepts the diff.

 interactive rebase in progress; onto 3efa513
 Last commands done (4 commands done):
    pick f1102ea wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected.
    pick a0dbf40 feat(chat): append tool call accepted message to chat when the user accepts the diff.
 Next commands to do (5 remaining commands):
    pick be1a614 wip(manual patch): remove the tool confiormation when manually applying patches.
    pick 7e4e644 fix: inconstancy with auto sending when accpetting or reject a patch multiple times.
 You are currently rebasing branch 'ui-patch-tool-changes' on '3efa5139'.

 Changes to be committed:
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForApp.ts
	modified:   refact-agent/gui/src/services/refact/types.ts

 Last commands done (4 commands done):
    pick 97d931b wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected.
    pick 7b5f40f feat(chat): append tool call accepted message to chat when the user accepts the diff.
 Next commands to do (19 remaining commands):
    pick 723aaa3 wip(manual patch): remove the tool confiormation when manually applying patches.
    pick 70dd139 fix: inconstancy with auto sending when accpetting or reject a patch multiple times.
 Changes to be committed:
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForApp.ts
	modified:   refact-agent/gui/src/services/refact/types.ts

* wip(manual patch): remove the tool confiormation when manually applying patches.

 Last commands done (5 commands done):
    pick 7b5f40f feat(chat): append tool call accepted message to chat when the user accepts the diff.
    pick 723aaa3 wip(manual patch): remove the tool confiormation when manually applying patches.
 Next commands to do (18 remaining commands):
    pick 70dd139 fix: inconstancy with auto sending when accpetting or reject a patch multiple times.
    pick b1b7910 fix(updating tool messages): handle multi model.
 Changes to be committed:
	modified:   refact-agent/gui/package.json
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/contexts/AbortControllers.tsx
	modified:   refact-agent/gui/src/features/ToolConfirmation/confirmationSlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForApp.ts

* fix: inconstancy with auto sending when accpetting or reject a patch multiple times.

* fix(updating tool messages): handle multi model.

* remove unused import.

* fix(apply): auto calls when user manually presses apply then accept/reject.

 You are currently rebasing branch 'ui-patch-tool-changes' on '3efa5139'.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

 Last commands done (9 commands done):
    pick 71bb762 remove unused import.
    pick cc24290 fix(apply): auto calls when user manually presses apply then accept/reject.
 Next commands to do (14 remaining commands):
    pick 36c5bcf fix(apply confirmation): add the correct message if the user accepts the result.
    pick cb56432 fix(acceot / reject): prevent sending message no rejection.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

* fix(apply confirmation): add the correct message if the user accepts the result.

* fix(acceot / reject): prevent sending message no rejection.

* fix: don't continue streaming if the user rejects the tool use.

* ui(confirmation): remove loading dots.

 interactive rebase in progress; onto c7e90e9
 Last commands done (14 commands done):
    pick 6989755 fix: don't continue streaming if the user rejects the tool use.
    pick 54d83da ui(confirmation): remove loading dots.
 Next commands to do (9 remaining commands):
    pick 61aa130 ui(markdown): remove custom stye for update textdoc
    pick 332ac4c ci: update version bump logic for alpha branch & npm publish in CI (#508)
 Changes to be committed:
	modified:   refact-agent/gui/src/components/ChatContent/ChatContent.tsx

* ui(markdown): remove custom stye for update textdoc

* ci: update version bump logic for alpha branch & npm publish in CI (#508)

* ci: update version bump logic for alpha branch & npm publish in CI

* ci: allow publish runs for test branch

* ci: debug info

* ci: test alpha version publishment

* ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment

* ci: add check for existing versions on publish attempt

* ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours

* ci: add notifications to slack

* ci: adjust notification text of npm publishment

* ci: jump over alpha.4 due to locks in 72 hours

* ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing

* ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update

* ci: working CI for publishment & version jump to alpha.7

* ci: separate build and publish workflows, committing updated package.json

* ci: fix alpha version bump check

* ci: pushing to branch based on ref_name instead of head_ref

* ci: fix of publish with latest or alpha tags based on ref_name

* Version bump 2.0.8-alpha.10

* ci: include release tag on npm in slack notification

* ci: version bump GUI & fix of setup vars

* Version bump 2.0.8-alpha.12

* ci: simplify checks in workflow

* Version bump 2.0.8-alpha.13

* ci: removed test/workflow-alpha-version mentions

* chore: restore original formatting of build ci workflow config file

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>

* fix(chat): remove unused import.

* a different Stop message without confirmation

* fix(accept / reject): continue when accepting or rejecting the changes.

 Last commands done (19 commands done):
    pick ac80b1f a different Stop message without confirmation
    pick 2995aa6 fix(accept / reject): continue when accepting or rejecting the changes.
 Next commands to do (4 remaining commands):
    pick c792dcd refactor(ideToolCallResponse): remove chat id.
    pick 1ef2ea5 remove comment.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

* refactor(ideToolCallResponse): remove chat id.

* remove comment.

* fix(patch): continue if accepted or allow clicked, stop if rejected of stop clicked.

 Last commands done (22 commands done):
    pick 1ef2ea5 remove comment.
    pick 685f095 fix(patch): continue if accepted or allow clicked, stop if rejected of stop clicked.
 Next command to do (1 remaining command):
    pick 2cc7859 feat(apply + accept): send the chat when the recent tool result has been accepted in the ide.
 Changes to be committed:
	modified:   refact-agent/gui/src/app/middleware.ts
	modified:   refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx
	modified:   refact-agent/gui/src/features/Chat/Thread/actions.ts
	modified:   refact-agent/gui/src/features/Chat/Thread/reducer.ts
	modified:   refact-agent/gui/src/features/History/historySlice.ts
	modified:   refact-agent/gui/src/hooks/useEventBusForIDE.ts
	modified:   refact-agent/gui/src/hooks/useSendChatRequest.ts

* feat(apply + accept): send the chat when the recent tool result has been accepted in the ide.

---------

Co-authored-by: Marc McIntosh <[email protected]>
Co-authored-by: Andrii Lashchov <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants