Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/agents/my-agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name:
description:
---

# My Agent

Describe what your agent does here...
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
yarn.lock
dist.zip
dist
dist
acodex_server
plugin.zip
14 changes: 14 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pull_request_rules:
- name: Notify when a PR is removed from the queue
description: Notify the PR author when its pull request is removed from the merge queue.
conditions:
- queue-dequeue-reason != none
- queue-dequeue-reason != pr-merged
actions:
comment:
message: >
Hey @{{author}}, your pull request has been dequeued due to the
following reason: {{queue_dequeue_reason}}.

Sorry about that, but you can requeue the PR by using `@mergifyio
requeue` if you think this was a mistake.
Binary file removed plugin.zip
Binary file not shown.
18 changes: 18 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

Read acode plugin [documentation](https://docs.acode.app/docs/) to develop plugin for acode editor.

## Setup

For a quick setup of the development environment, run:

```bash
chmod +x setup.sh
./setup.sh
```

This script will:
- Check for npm (if not found, provides manual installation instructions)
- Check for Zed editor (if not found, provides manual installation instructions)
- Clone the acodex_server repository
- Install project dependencies
- Build the project

**Note:** The script requires npm and Zed editor to be installed manually for security reasons. It will not automatically install these tools.

## Usage

Use this for debug build:
Expand Down
102 changes: 102 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/bin/bash

# Setup script for Acode Plugin Development Environment
# This script installs required tools and dependencies

set -e # Exit on error

echo "=========================================="
echo "Acode Plugin Development Setup"
echo "=========================================="
echo ""

# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}

# Check npm installation
echo "Step 1: Checking npm installation..."
if command_exists npm; then
echo "✓ npm is already installed (version: $(npm --version))"
else
echo "npm is not installed."
echo "For security reasons, this script does not install npm automatically."
echo "Please install Node.js and npm using your system's package manager or a version manager like nvm."
echo ""
echo "Examples:"
echo " On Ubuntu/Debian: sudo apt update && sudo apt install nodejs npm"
echo " On macOS: brew install node"
echo " Using nvm: https://github.com/nvm-sh/nvm"
echo ""
echo "After installing Node.js and npm, re-run this setup script."
exit 1
fi
echo ""

# Check Zed editor installation
echo "Step 2: Checking Zed editor installation..."
if command_exists zed; then
echo "✓ Zed editor is already installed"
else
echo "Zed editor is not installed."
echo "For security reasons, this script does not install Zed editor automatically."
echo "Please install Zed editor manually from the official website:"
echo " https://zed.dev/download"
echo ""
echo "After installing Zed editor, re-run this setup script."
exit 1
fi
echo ""

# Clone acodex_server repository if it doesn't exist
echo "Step 3: Checking acodex_server repository..."
if [ -d "acodex_server" ]; then
echo "✓ acodex_server repository already exists"
echo " Updating repository..."
(
cd acodex_server || exit 1
if ! git pull 2>../git_pull_error.log; then
echo "✗ Could not update repository. See details below:" >&2
cat ../git_pull_error.log >&2
echo "Please manually review the repository for issues such as merge conflicts, network problems, or uncommitted changes." >&2
echo "You may need to resolve these issues before continuing." >&2
exit 1
fi
)
exit_code=$?
rm -f git_pull_error.log
if [ $exit_code -ne 0 ]; then
exit 1
fi
else
echo "Cloning acodex_server repository..."
if command_exists gh; then
gh repo clone bajrangCoder/acodex_server
else
git clone https://github.com/bajrangCoder/acodex_server.git
fi
echo "✓ acodex_server repository cloned successfully"
fi
echo ""

# Install project dependencies
echo "Step 4: Installing project dependencies..."
npm install
echo "✓ Dependencies installed successfully"
echo ""

# Build the project
echo "Step 5: Building the project..."
npm run build
echo "✓ Project built successfully"
echo ""

echo "=========================================="
echo "Setup completed successfully!"
echo "=========================================="
echo ""
echo "You can now start development with:"
echo " npm run dev - Start development build (esbuild serve mode)"
echo " npm run build - Build for production"
echo ""