-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from Aryamirsepasi/main
Beta 5 of macOS Port
- Loading branch information
Showing
22 changed files
with
1,736 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,106 @@ | ||
# Writing Tools for macOS | ||
|
||
This is a new, **native macOS port of Writing Tools**, created entirely by @Aryamirsepasi 🎉 | ||
|
||
Core functionality works well, and it is still an ongoing work in progress. | ||
|
||
--- | ||
|
||
## Working Features | ||
- All of the tools, including the new response windows and the manual chat option. | ||
- Input Window even when no text is selected | ||
- Gemini, OpenAI and Local LLM Support. | ||
- The Gradient Theme (Dark Mode and Light Mode are supported). | ||
- Initial Setup, Settings, and About pages. | ||
|
||
--- | ||
|
||
## Not Yet Available | ||
- All of the original port's features are now available; however, more optimizations and improvements are coming soon. | ||
|
||
--- | ||
|
||
## System Requirements | ||
Due to the accessibility features the app uses (e.g., automatically selecting the window containing the text and pasting the updated version), **the minimum macOS version required is 14.0**. | ||
|
||
--- | ||
|
||
## How to Build This Project | ||
|
||
Since the `.xcodeproj` file is excluded, you can still build the project manually by following these steps: | ||
|
||
1. **Install Xcode** | ||
- Ensure you have Xcode installed on your macOS system. | ||
- Download it from the [Mac App Store](https://apps.apple.com/us/app/xcode/id497799835). | ||
|
||
2. **Clone the Repository** | ||
- Clone this repository to your local machine: | ||
```bash | ||
git clone https://github.com/theJayTea/WritingTools.git | ||
cd WritingTools | ||
``` | ||
|
||
3. **Open the Project in Xcode** | ||
- Open Xcode. | ||
- Select **File > Open** from the menu bar. | ||
- Navigate to the `macOS` folder and select it. | ||
|
||
4. **Generate the Project File** | ||
- Run the following command to generate the `.xcodeproj` file: | ||
```bash | ||
swift package generate-xcodeproj | ||
``` | ||
|
||
5. **Build the Project** | ||
- Select your target device as **My Mac** in Xcode. | ||
- Build the project by clicking the **Play** button (or pressing `Command + R`). | ||
|
||
6. **Run the App** | ||
- After the build is successful, the app will launch automatically. | ||
|
||
--- | ||
|
||
## Credits | ||
|
||
The macOS port is being developed by **Aryamirsepasi**. | ||
|
||
GitHub: [https://github.com/Aryamirsepasi](https://github.com/Aryamirsepasi) | ||
# Writing Tools for macOS | ||
|
||
This is a new, **native macOS port of Writing Tools**, created entirely by @Aryamirsepasi 🎉 | ||
|
||
Core functionality works well, and it is still an ongoing work in progress. | ||
|
||
--- | ||
|
||
## Working Features | ||
- All of the tools, including the new response windows and the manual chat option. | ||
- Input Window even when no text is selected | ||
- Gemini, OpenAI and Local LLM Support. | ||
- The Gradient Theme (Dark Mode and Light Mode are supported). | ||
- Initial Setup, Settings, and About pages. | ||
|
||
--- | ||
|
||
## Not Yet Available | ||
- All of the original port's features are now available; however, more optimizations and improvements are coming soon. | ||
|
||
--- | ||
|
||
## System Requirements | ||
Due to the accessibility features the app uses (e.g., automatically selecting the window containing the text and pasting the updated version), **the minimum macOS version required is 14.0**. | ||
|
||
--- | ||
|
||
## How to Build This Project | ||
|
||
Since the `.xcodeproj` file is excluded, you can still build the project manually by following these steps: | ||
This guide will help you properly set up the Writing Tools macOS project in Xcode. | ||
|
||
## System Requirements | ||
- macOS 14.0 or later | ||
- Xcode 15.0 or later | ||
- Git | ||
|
||
## Installation Steps | ||
|
||
1. **Install Xcode** | ||
- Download and install Xcode from the App Store | ||
- Launch Xcode once installed and complete any additional component installations | ||
|
||
2. **Clone the Repository** | ||
- Open Terminal and navigate to a directory you want the project to be in: | ||
```bash | ||
git clone https://github.com/theJayTea/WritingTools.git | ||
cd WritingTools | ||
``` | ||
|
||
3. **Create Xcode Project** | ||
- Navigate to the project's macOS directory: | ||
```bash | ||
cd macOS | ||
``` | ||
- Create a new Xcode project: | ||
```bash | ||
xcodebuild -project writing-tools.xcodeproj | ||
``` | ||
|
||
4. **Open in Xcode** | ||
- Double-click the generated `writing-tools.xcodeproj` file | ||
- Or open Xcode and select "Open a Project or File" | ||
- Navigate to the `WritingTools/macOS/writing-tools.xcodeproj` file | ||
5. **Configure Project Settings** | ||
- In Xcode, select the project in the navigator | ||
- Under "Targets", select "writing-tools" | ||
- Set the following: | ||
- Deployment Target: macOS 14.0 | ||
- Signing & Capabilities: Add your development team | ||
6. **Install Dependencies** | ||
- In Terminal, run: | ||
```bash | ||
cd macOS | ||
swift package resolve | ||
``` | ||
7. **Build and Run** | ||
- In Xcode, select "My Mac" as the run destination | ||
- Click the Play button or press ⌘R to build and run | ||
## Troubleshooting | ||
If you encounter the "Could not open file" error: | ||
1. Ensure you're opening the `.xcodeproj` file, not the folder | ||
2. If the error persists, try: | ||
```bash | ||
cd WritingTools/macOS | ||
rm -rf writing-tools.xcodeproj | ||
xcodebuild -project writing-tools.xcodeproj | ||
``` | ||
## Additional Notes | ||
- The project requires macOS 14.0+ due to accessibility features | ||
- Make sure all required permissions are granted when first launching the app | ||
- For development, ensure you have the latest Xcode Command Line Tools installed | ||
--- | ||
## Credits | ||
The macOS port is being developed by **Aryamirsepasi**. | ||
GitHub: [https://github.com/Aryamirsepasi](https://github.com/Aryamirsepasi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import Foundation | ||
|
||
protocol AIProvider: ObservableObject { | ||
|
||
// Indicates if provider is processing a request | ||
var isProcessing: Bool { get set } | ||
|
||
// Process text with optional system prompt | ||
func processText(systemPrompt: String?, userPrompt: String) async throws -> String | ||
|
||
// Cancel ongoing requests | ||
func cancel() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.