Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint YAML Files

on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

jobs:
lint:
runs-on: action-runner-large-cpu-gcp
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install yamllint
run: pip install yamllint
- name: Lint
run: yamllint .
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args:
- --strict
- -c=.yamllint
4 changes: 4 additions & 0 deletions .yamlfix.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sequence_style = "block_style"
line_length = 80
explicit_start = false
section_whitelines = 1
14 changes: 14 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
extends: default

rules:
# 80 chars should be enough, but don't fail if a line is longer
line-length:
max: 80
level: warning

document-start: disable

ignore: |
.venv/*
venv/*
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.PHONY: create-venv install-deps lint format

# Create virtual environment only if .venv doesn't exist
create-venv:
@if [ ! -d ".venv" ]; then \
if ! python3 -m venv --help >/dev/null 2>&1; then \
echo "Python venv module not available. Please install Python with venv support."; \
exit 1; \
fi; \
python3 -m venv .venv; \
fi

install-deps:
@if command -v pip >/dev/null 2>&1; then \
pip install yamllint yamlfix pre-commit; \
pre-commit install; \
else \
echo "Pip not found or not running with venv. Please run \`make create-venv\` first."; \
exit 1; \
fi

lint:
@if [ -z "$$VIRTUAL_ENV" ]; then \
echo "Please activate Python virtual environment first."; \
exit 1; \
fi; \
yamllint .

format:
@if [ -z "$$VIRTUAL_ENV" ]; then \
echo "Please activate Python virtual environment first."; \
exit 1; \
fi; \
yamlfix . --config-file .yamlfix.toml --exclude ".github/**" --exclude ".venv/**" --exclude "venv/**"
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# xAI on hub.continue.dev

You will find more information in the [Continue 1.0 Partnership Guide](https://continuedev.notion.site/Continue-1-0-Partnership-Guide-1811d55165f7802686fcd0b70464e778).

# Setting up Continue at xAI

To use Continue at xAI, you can set up Continue on your local machine.

- VSCode: Install [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and click on "Switch to Pre-Release Version" after installation.
- JetBrains: Install [JetBrains Plugin](https://plugins.jetbrains.com/plugin/22707-continue)

First, copy the config yaml file you want to use to:
- On Mac/Linux: `~/.continue/config.yaml`
- On Windows: `%USERPROFILE%\.continue\config.yaml`

Replace `apiKey` with the API key you get on https://console.x.ai, be sure you are on a team with the right model access permissions.

# Developing

To develop, first run:
```
make create-venv
```

Then activate the Python virtual environment, install dependencies and setup pre-commit hook:
```
source ./venv/bin/activate
make install-deps
```

When you develop, use `make lint` to check the yaml formatting, and `make format` to fix formatting. Under the hood, it is using `yamllint` and `yamlfix` to enforce these rules. The configuration files are `.yamlint` and `.yamlfix.toml` respectively.
Loading