Skip to content

Commit 8c9a0a9

Browse files
authored
Patch scripts + first patch (#6)
* Add patch and build scripts * Apply patches --------- Co-authored-by: sellitus <sellitus>
1 parent 780b9e0 commit 8c9a0a9

File tree

16 files changed

+128
-33
lines changed

16 files changed

+128
-33
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Ran Prettier on all files - https://github.com/RooVetGit/Roo-Code/pull/404
1+
# Ran Prettier on all files - https://github.com/RooVetGit/Rootastic/pull/404
22
60a0a824b96a0b326af4d8871b6903f4ddcfe114
33
579bdd9dbf6d2d569e5e7adb5ff6292b1e42ea34

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Feature Request
4-
url: https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests
4+
url: https://github.com/RooVetGit/Rootastic/discussions/categories/feature-requests
55
about: Share and vote on feature requests for Roo Code
66
- name: Leave a Review
77
url: https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline&ssr=false#review-details

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
- Ask and Architect modes can now edit markdown files
6868
- Custom modes can now be restricted to specific file patterns (for example, a technical writer who can only edit markdown files 👋)
6969
- Support for configuring the Bedrock provider with AWS Profiles
70-
- New Roo Code community Discord at https://roocode.com/discord!
70+
- New Roo Code community Discord at https://rootastic.com/discord!
7171

7272
## [3.2.8]
7373

@@ -107,7 +107,7 @@
107107
- Create specialized assistants for any workflow
108108
- Just type "Create a new mode for <X>" or visit the Prompts tab in the top menu to get started
109109

110-
Join us at https://www.reddit.com/r/RooCode to share your custom modes and be part of our next chapter!
110+
Join us at https://www.reddit.com/r/Rootastic to share your custom modes and be part of our next chapter!
111111

112112
## [3.1.7]
113113

@@ -160,7 +160,7 @@ Join us at https://www.reddit.com/r/RooCode to share your custom modes and be pa
160160

161161
## [3.0.0]
162162

163-
- This release adds chat modes! Now you can ask Roo Code questions about system architecture or the codebase without immediately jumping into writing code. You can even assign different API configuration profiles to each mode if you prefer to use different models for thinking vs coding. Would love feedback in the new Roo Code Reddit! https://www.reddit.com/r/RooCode
163+
- This release adds chat modes! Now you can ask Roo Code questions about system architecture or the codebase without immediately jumping into writing code. You can even assign different API configuration profiles to each mode if you prefer to use different models for thinking vs coding. Would love feedback in the new Roo Code Reddit! https://www.reddit.com/r/Rootastic
164164

165165
## [2.2.46]
166166

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<a href="https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline" target="_blank"><strong>Download on VS Marketplace</strong></a>
77
</td>
88
<td align="center">
9-
<a href="https://discord.gg/roocode" target="_blank"><strong>Discord</strong></a>
9+
<a href="https://discord.gg/rootastic" target="_blank"><strong>Discord</strong></a>
1010
</td>
1111
<td align="center">
12-
<a href="https://www.reddit.com/r/RooCode/" target="_blank"><strong>r/RooCode</strong></a>
12+
<a href="https://www.reddit.com/r/Rootastic/" target="_blank"><strong>r/Rootastic</strong></a>
1313
</td>
1414
<td align="center">
15-
<a href="https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop" target="_blank"><strong>Feature Requests</strong></a>
15+
<a href="https://github.com/RooVetGit/Rootastic/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop" target="_blank"><strong>Feature Requests</strong></a>
1616
</td>
1717
<td align="center">
1818
<a href="https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline&ssr=false#review-details" target="_blank"><strong>Rate & Review</strong></a>
@@ -51,7 +51,7 @@ Roo Code now integrates directly with VS Code's native code actions system, prov
5151

5252
### Join Our Discord!
5353

54-
We've launched a new Discord community! Join us at [https://roocode.com/discord](https://roocode.com/discord) to:
54+
We've launched a new Discord community! Join us at [https://rootastic.com/discord](https://rootastic.com/discord) to:
5555

5656
- Share your custom modes
5757
- Get help and support
@@ -75,7 +75,7 @@ To mark this new chapter, we're introducing the power to shape Roo Code into any
7575

7676
The best part is that Roo can help you create these new modes! Just type "Create a new mode for <X>" in the chat to get started, and go into the Prompts tab or (carefully) edit the JSON representation to customize the prompt and allowed tools to your liking.
7777

78-
We can't wait to hear more about what you build and how we can continue to evolve the Roo Code platform to support you. Please join us in our new https://www.reddit.com/r/RooCode subreddit to share your custom modes and be part of our next chapter. 🚀
78+
We can't wait to hear more about what you build and how we can continue to evolve the Roo Code platform to support you. Please join us in our new https://www.reddit.com/r/Rootastic subreddit to share your custom modes and be part of our next chapter. 🚀
7979

8080
## New in 3.1: Chat Mode Prompt Customization & Prompt Enhancements
8181

@@ -240,7 +240,7 @@ Roo Code is available on:
240240

241241
1. **Clone** the repo:
242242
```bash
243-
git clone https://github.com/RooVetGit/Roo-Code.git
243+
git clone https://github.com/RooVetGit/Rootastic.git
244244
```
245245
2. **Install dependencies**:
246246
```bash
@@ -253,7 +253,7 @@ Roo Code is available on:
253253
- A `.vsix` file will appear in the `bin/` directory.
254254
4. **Install** the `.vsix` manually if desired:
255255
```bash
256-
code --install-extension bin/roo-code-4.0.0.vsix
256+
code --install-extension bin/rootastic-4.0.0.vsix
257257
```
258258
5. **Start the webview (Vite/React app with HMR)**:
259259
```bash
@@ -278,10 +278,10 @@ We use [changesets](https://github.com/changesets/changesets) for versioning and
278278

279279
We love community contributions! Here’s how to get involved:
280280

281-
1. **Check Issues & Requests**: See [open issues](https://github.com/RooVetGit/Roo-Code/issues) or [feature requests](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests).
281+
1. **Check Issues & Requests**: See [open issues](https://github.com/RooVetGit/Rootastic/issues) or [feature requests](https://github.com/RooVetGit/Rootastic/discussions/categories/feature-requests).
282282
2. **Fork & branch** off `main`.
283283
3. **Submit a Pull Request** once your feature or fix is ready.
284-
4. **Join** our [Reddit community](https://www.reddit.com/r/RooCode/) and [Discord](https://roocode.com/discord) for feedback, tips, and announcements.
284+
4. **Join** our [Reddit community](https://www.reddit.com/r/Rootastic/) and [Discord](https://rootastic.com/discord) for feedback, tips, and announcements.
285285

286286
---
287287

@@ -291,4 +291,4 @@ We love community contributions! Here’s how to get involved:
291291

292292
---
293293

294-
**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Reddit community](https://www.reddit.com/r/RooCode/) or [Discord](https://roocode.com/discord). Happy coding!
294+
**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Reddit community](https://www.reddit.com/r/Rootastic/) or [Discord](https://rootastic.com/discord). Happy coding!

bld_and_install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run build && code --install-extension bin/rootastic-*.vsix

docs/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ title: Roo Code Documentation
22
description: Documentation for the Roo Code project
33
remote_theme: just-the-docs/just-the-docs
44

5-
url: https://docs.roocode.com
5+
url: https://docs.rootastic.com
66

77
aux_links:
88
"Roo Code on GitHub":
9-
- "//github.com/RooVetGit/Roo-Code"
9+
- "//github.com/RooVetGit/Rootastic"
1010

1111
# Enable search
1212
search_enabled: true

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
mkDevShell = system: let
1414
pkgs = import nixpkgs { inherit system; };
1515
in pkgs.mkShell {
16-
name = "roo-code";
16+
name = "rootastic";
1717

1818
packages = with pkgs; [
1919
zsh

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
},
1818
"repository": {
1919
"type": "git",
20-
"url": "https://github.com/RooVetGit/Roo-Code"
20+
"url": "https://github.com/RooVetGit/Rootastic"
2121
},
22-
"homepage": "https://github.com/RooVetGit/Roo-Code",
22+
"homepage": "https://github.com/RooVetGit/Rootastic",
2323
"categories": [
2424
"AI",
2525
"Chat",
@@ -42,7 +42,7 @@
4242
"ai",
4343
"llama",
4444
"roo code",
45-
"roocode"
45+
"rootastic"
4646
],
4747
"activationEvents": [
4848
"onLanguage",

rootastic-patch.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import os
2+
import re
3+
4+
5+
6+
replacements = [
7+
# {
8+
# "start_marker": "CAPABILITIES\n\n",
9+
# "new_content": """
10+
# Test 1
11+
# """
12+
# },
13+
# {
14+
# "start_marker": "USER'S CUSTOM INSTRUCTIONS\n\n",
15+
# "new_content": """
16+
# Test 2
17+
# """
18+
# },
19+
# # Add more sections here if desired
20+
]
21+
22+
def replace_section(text, start_marker, new_content):
23+
pattern = rf"({re.escape(start_marker)})(.*?)(?=(?:\n|\`|\')\s*:\s*\"\"|$)"
24+
return re.sub(pattern, rf"\1{new_content}", text, flags=re.DOTALL)
25+
26+
def patch_instructions(base_directory):
27+
28+
if base_directory == "":
29+
base_directory = os.getcwd()
30+
31+
for root, dirs, files in os.walk(base_directory):
32+
for filename in files:
33+
if filename.endswith(".ts"):
34+
filepath = os.path.join(root, filename)
35+
with open(filepath, "r", encoding="utf-8") as f:
36+
original_text = f.read()
37+
38+
new_text = original_text
39+
for rep in replacements:
40+
new_text = replace_section(
41+
new_text,
42+
rep["start_marker"],
43+
rep["new_content"],
44+
)
45+
46+
if new_text != original_text:
47+
with open(filepath, "w", encoding="utf-8") as f:
48+
f.write(new_text)
49+
print(f"Patched: {filepath}")
50+
51+
def patch_name(base_directory):
52+
if base_directory == "":
53+
base_directory = os.getcwd()
54+
55+
for root, dirs, files in os.walk(base_directory):
56+
for filename in files:
57+
filepath = os.path.join(root, filename)
58+
if os.path.isfile(filepath):
59+
try:
60+
with open(filepath, 'r', encoding='utf-8') as f:
61+
content = f.read()
62+
63+
new_content = re.sub(r'(?i)roo-?code', lambda m: 'rootastic' if m.group().islower() else 'Rootastic', content)
64+
65+
if new_content != content:
66+
with open(filepath, 'w', encoding='utf-8') as f:
67+
f.write(new_content)
68+
print(f"Renamed Rootastic references in: {filepath}")
69+
except UnicodeDecodeError:
70+
# Skip binary files and files with non-UTF-8 encoding
71+
continue
72+
73+
74+
if __name__ == "__main__":
75+
# Adjust the path if necessary
76+
patch_dir = "src/core/prompts/sections"
77+
patch_instructions(patch_dir)
78+
patch_name("")

rootastic-patch.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e # exit immediately if a command exits with a non-zero status
3+
4+
# Step 1: Fetch and merge upstream changes from the master/main branch
5+
git fetch upstream
6+
git checkout main
7+
git merge upstream/main
8+
9+
# Step 2: Apply the custom patch
10+
if git apply --check myCustom.patch; then
11+
git apply myCustom.patch
12+
echo "Custom patch applied successfully."
13+
else
14+
echo "Error: Patch did not apply cleanly. Please resolve conflicts manually."
15+
exit 1
16+
fi

0 commit comments

Comments
 (0)