diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..f0a910a7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +gh pr checkout 2{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": {} +} diff --git a/.env.json b/.env.json new file mode 100644 index 00000000..664470e4 --- /dev/null +++ b/.env.json @@ -0,0 +1,12 @@ +# Azure Storage Configuration +AZURE_STORAGE_ACCOUNT_NAME=your-storage-account-name +AZURE_STORAGE_CONTAINER_NAME=your-container-name + +# Azure Authentication +# For local development, you can use: +# 1. Azure CLI: az login +# 2. Environment variables: AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID +# 3. Managed Identity (when running on Azure) + +# Node Environment +NODE_ENV=development diff --git a/.github/workflows/azure-webapps-node.yml b/.github/workflows/azure-webapps-node.yml new file mode 100644 index 00000000..2ebbac24 --- /dev/null +++ b/.github/workflows/azure-webapps-node.yml @@ -0,0 +1,78 @@ +# This workflow will build and push a node.js application to an Azure Web App when a commit is pushed to your default branch. +# +# This workflow assumes you have already created the target Azure App Service web app. +# For instructions see https://docs.microsoft.com/en-us/azure/app-service/quickstart-nodejs?tabs=linux&pivots=development-environment-cli +# +# To configure this workflow: +# +# 1. Download the Publish Profile for your Azure Web App. You can download this file from the Overview page of your Web App in the Azure Portal. +# For more information: https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel#generate-deployment-credentials +# +# 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret. +# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret +# +# 3. Change the value for the AZURE_WEBAPP_NAME. Optionally, change the AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables below. +# +# For more information on GitHub Actions for Azure: https://github.com/Azure/Actions +# For more information on the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +env: + AZURE_WEBAPP_NAME: your-app-name # set this to your application's name + AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root + NODE_VERSION: '20.x' # set this to the node version to use + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: node-app + path: . + + deploy: + permissions: + contents: none + runs-on: ubuntu-latest + needs: build + environment: + name: 'Development' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: node-app + + - name: 'Deploy to Azure WebApp' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..b8b9a01d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ + - name: Execute Job + # You may pin to the exact commit or the version. + # uses: parasoft/execute-job-action@1899d360584e281e027c537d2df0f75a1115776e + uses: parasoft/execute-job-action@1.0.7 + with: + # CTP URL + ctpUrl: + # CTP Username + ctpUsername: + # CTP Password + ctpPassword: + # CTP Test Execution Job Name + ctpJob: + # Abort the job after timeout exceeded + abortOnTimeout: # optional + # Timeout value in minutes + timeoutInMinutes: # optional + # Publish test execution results to DTP + publishReport: # optional + # DTP URL + dtpUrl: # optional + # DTP Username + dtpUsername: # optional + # DTP Password + dtpPassword: # optional + # DTP Project Name + dtpProject: # optional + # Build ID to send to DTP + buildId: # optional + # Session Tag to send to DTP + sessionTag: # optional + # Append the test variable set environment name to the session tag + appendEnvironment: # optional + diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index 2a864ddd..773336b0 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -15,6 +15,9 @@ jobs: steps: - uses: actions/stale@v9 with: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=env: + + repo-token: ${{ secrets.GITHUB_TOKEN }} only-issue-labels: 'more-info-needed' days-before-issue-stale: -1 # Skip stale state, go directly to close @@ -24,11 +27,31 @@ jobs: remove-stale-when-updated: true close-issue-message: > Thank you for your issue! - - We haven't gotten a response to our questions above. With only the - information that is currently in the issue, we don't have enough - information to take action. We're going to close this but don't - hesitate to reach out if you have or find the answers we need. If - you answer our questions above, this issue will automatically - reopen. - close-issue-reason: 'not_planned' + - name: Setup Node.js environment + uses: actions/setup-node@v6.3.0 + with: + # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0. + node-version: # optional + # File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions. + node-version-file: # optional + # Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. + architecture: # optional + # Set this option if you want the action to check for the latest available version that satisfies the version spec. + check-latest: # optional + # Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN. + registry-url: # optional + # Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/). + scope: # optional + # Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. + token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }} + # Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm. + cache: # optional + # Set to false to disable automatic caching. By default, caching is enabled when either devEngines.packageManager or the top-level packageManager field in package.json specifies npm as the package manager. + package-manager-cache: # optional, default is true + # Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. + cache-dependency-path: # optional + # Used to specify an alternative mirror to download Node.js binaries from + mirror: # optional + # The token used as Authorization header when fetching from the mirror + mirror-token: # optional + diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 00000000..2284b935 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 00000000..2a4766d3 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,33 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml new file mode 100644 index 00000000..887256e1 --- /dev/null +++ b/.github/workflows/runner.yml @@ -0,0 +1,138 @@ + - name: Deploy GitHub Runner to AWS (EC2) + # You may pin to the exact commit or the version. + # uses: bitovi/github-actions-deploy-github-runner-to-ec2@6e35bdc2c305bec7608655b84227b88ac75c5961 + uses: bitovi/github-actions-deploy-github-runner-to-ec2@v0 + with: + # Specifies if this action should checkout the code + checkout: # optional, default is true + # Will run only the generation phase of BitOps, where the Terraform and Ansible code is built. + bitops_code_only: # optional + # Store BitOps code as a GitHub artifact + bitops_code_store: # optional + # Repo URL for the runner to listen to + repo_url: + # Repo access token + repo_access_token: + # AWS access key ID + aws_access_key_id: # optional + # AWS secret access key + aws_secret_access_key: # optional + # AWS session token + aws_session_token: # optional + # AWS default region + aws_default_region: # optional, default is us-east-1 + # Set to override the AWS resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources. + aws_resource_identifier: # optional + # A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` + aws_additional_tags: # optional + # Set to "true" to Destroy the stack through Terraform. + tf_stack_destroy: # optional + # Change this to be anything you want to. Carefull to be consistent here. A missing file could trigger recreation, or stepping over destruction of non-defined objects. + tf_state_file_name: # optional + # Append a string to the tf-state-file. Setting this to `unique` will generate `tf-state-aws-unique`. Can co-exist with the tf_state_file_name variable. + tf_state_file_name_append: # optional + # AWS S3 bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state` + tf_state_bucket: # optional + # Force purge and deletion of S3 bucket defined. Any file contained there will be destroyed. `tf_stack_destroy` must also be `true` + tf_state_bucket_destroy: # optional + # Secret name to pull env variables from AWS Secret Manager, could be a comma separated list, read in order. Expected JSON content. + env_aws_secret: # optional + # File containing environment variables to be used with the app + env_repo: # optional + # `.env` file to be used with the app from Github secrets + env_ghs: # optional + # `.env` file to be used with the app from Github variables + env_ghv: # optional + # Define if an EC2 instance should be created + aws_ec2_instance_create: # optional + # AWS AMI Filter string. Will be used to lookup for lates image based on the string. Defaults to `ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*`. + aws_ec2_ami_filter: # optional + # Owner of AWS AMI image. This ensures the provider is the one we are looking for. Defaults to `099720109477`, Canonical (Ubuntu). + aws_ec2_ami_owner: # optional + # AWS AMI ID. Will default to lookup for latest image of the `aws_ec2_ami_filter` string. This will override `aws_ec2_ami_filter` lookup. + aws_ec2_ami_id: # optional + # Set this to true if you want to recreate the EC2 instance if there is a newer version of the AMI. + aws_ec2_ami_update: # optional + # The AWS IAM instance profile to use for the EC2 instance + aws_ec2_iam_instance_profile: # optional + # The AWS Instance type + aws_ec2_instance_type: # optional + # Define the volume size (in GiB) for the root volume on the AWS Instance. + aws_ec2_instance_root_vol_size: # optional + # Set this to true to avoid deletion of root volume on termination. Defaults to false. + aws_ec2_instance_root_vol_preserve: # optional + # The name of the EC2 security group + aws_ec2_security_group_name: # optional + # Generates and manages a secret manager entry that contains the public and private keys created for the ec2 instance. + aws_ec2_create_keypair_sm: # optional + # Add a public IP to the instance or not. (Not an Elastic IP) + aws_ec2_instance_public_ip: # optional + # List of ports to be enabled as an ingress rule in the EC2 SG, in a [xx,yy] format - Not the ELB + aws_ec2_port_list: # optional + # Relative path in the repo for a user provided script to be executed with Terraform EC2 Instance creation. + aws_ec2_user_data_file: # optional, default is no-file-provided + # If user_data file changes, instance will stop and start. Hence public IP will change. Defaults to true. + aws_ec2_user_data_replace_on_change: # optional + # A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` + aws_ec2_additional_tags: # optional + # Define if a VPC should be created + aws_vpc_create: # optional + # Set a specific name for the VPC + aws_vpc_name: # optional + # Define Base CIDR block which is divided into subnet CIDR blocks. Defaults to 10.0.0.0/16. + aws_vpc_cidr_block: # optional + # Comma separated list of public subnets. Defaults to 10.10.110.0/24 + aws_vpc_public_subnets: # optional + # Comma separated list of private subnets. If none, none will be created. + aws_vpc_private_subnets: # optional + # Comma separated list of availability zones. Defaults to `aws_default_region. + aws_vpc_availability_zones: # optional + # AWS VPC ID. Accepts `vpc-###` values. + aws_vpc_id: # optional + # Specify a Subnet to be used with the instance. If none provided, will pick one. + aws_vpc_subnet_id: # optional + # Enables NAT gateway + aws_vpc_enable_nat_gateway: # optional + # Creates only one NAT gateway + aws_vpc_single_nat_gateway: # optional + # Comma separated list of IP IDS to reuse in the NAT gateways + aws_vpc_external_nat_ip_ids: # optional + # A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` + aws_vpc_additional_tags: # optional + # + aws_secret_env: # optional + # + repo_env: # optional + # + dot_env: # optional + # + ghv_env: # optional + # + stack_destroy: # optional + # + additional_tags: # optional + # + ec2_instance_profile: # optional + # + ec2_instance_type: # optional + # + ec2_ami_id: # optional + # + ec2_ami_update: # optional + # + ec2_volume_size: # optional + # + ec2_root_preserve: # optional + # + ec2_security_group_name: # optional + # + ec2_create_keypair_sm: # optional + # + ec2_instance_public_ip: # optional + # + ec2_user_data_file: # optional, default is no-file-provided + # + ec2_user_data_replace_on_change: # optional + # + ec2_additional_tags: # optional + diff --git a/.github/workflows/src.json b/.github/workflows/src.json new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github/workflows/src.json @@ -0,0 +1 @@ + diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 00000000..897deb6b --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,28 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 22.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npx webpack diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb new file mode 100644 index 00000000..363fcab7 --- /dev/null +++ b/.ipynb_checkpoints/Untitled-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/.ipynb_checkpoints/install-checkpoint.sh b/.ipynb_checkpoints/install-checkpoint.sh new file mode 100755 index 00000000..01886f13 --- /dev/null +++ b/.ipynb_checkpoints/install-checkpoint.sh @@ -0,0 +1,137 @@ +#!/usr/bin/env bash +set -e + +# GitHub Copilot CLI Installation Script +# Usage: curl -fsSL https://gh.io/copilot-install | bash +# or: wget -qO- https://gh.io/copilot-install | bash +# Use | sudo bash to run as root and install to /usr/local/bin +# Export PREFIX to install to $PREFIX/bin/ directory (default: /usr/local for +# root, $HOME/.local for non-root), e.g., export PREFIX=$HOME/custom to install +# to $HOME/custom/bin + +echo "Installing GitHub Copilot CLI..." + +# Detect platform +case "$(uname -s || echo "")" in + Darwin*) PLATFORM="darwin" ;; + Linux*) PLATFORM="linux" ;; + *) + if command -v winget >/dev/null 2>&1; then + echo "Windows detected. Installing via winget..." + winget install GitHub.Copilot + exit $? + else + echo "Error: Windows detected but winget not found. Please see https://gh.io/install-copilot-readme" >&2 + exit 1 + fi + ;; +esac + +# Detect architecture +case "$(uname -m)" in + x86_64|amd64) ARCH="x64" ;; + aarch64|arm64) ARCH="arm64" ;; + *) echo "Error: Unsupported architecture $(uname -m)" >&2 ; exit 1 ;; +esac + +# Determine download URL based on VERSION +if [ -n "$VERSION" ]; then + # Prefix version with 'v' if not already present + case "$VERSION" in + v*) ;; + *) VERSION="v$VERSION" ;; + esac + DOWNLOAD_URL="https://github.com/github/copilot-cli/releases/download/${VERSION}/copilot-${PLATFORM}-${ARCH}.tar.gz" + CHECKSUMS_URL="https://github.com/github/copilot-cli/releases/download/${VERSION}/SHA256SUMS.txt" +else + DOWNLOAD_URL="https://github.com/github/copilot-cli/releases/latest/download/copilot-${PLATFORM}-${ARCH}.tar.gz" + CHECKSUMS_URL="https://github.com/github/copilot-cli/releases/latest/download/SHA256SUMS.txt" +fi +echo "Downloading from: $DOWNLOAD_URL" + +# Download and extract with error handling +TMP_DIR="$(mktemp -d)" +TMP_TARBALL="$TMP_DIR/copilot-${PLATFORM}-${ARCH}.tar.gz" +if command -v curl >/dev/null 2>&1; then + curl -fsSL "$DOWNLOAD_URL" -o "$TMP_TARBALL" +elif command -v wget >/dev/null 2>&1; then + wget -qO "$TMP_TARBALL" "$DOWNLOAD_URL" +else + echo "Error: Neither curl nor wget found. Please install one of them." + rm -rf "$TMP_DIR" + exit 1 +fi + +# Attempt to download checksums file and validate +TMP_CHECKSUMS="$TMP_DIR/SHA256SUMS.txt" +CHECKSUMS_AVAILABLE=false +if command -v curl >/dev/null 2>&1; then + curl -fsSL "$CHECKSUMS_URL" -o "$TMP_CHECKSUMS" 2>/dev/null && CHECKSUMS_AVAILABLE=true +elif command -v wget >/dev/null 2>&1; then + wget -qO "$TMP_CHECKSUMS" "$CHECKSUMS_URL" 2>/dev/null && CHECKSUMS_AVAILABLE=true +fi + +if [ "$CHECKSUMS_AVAILABLE" = true ]; then + if command -v sha256sum >/dev/null 2>&1; then + if (cd "$TMP_DIR" && sha256sum -c --ignore-missing SHA256SUMS.txt >/dev/null 2>&1); then + echo "✓ Checksum validated" + else + echo "Error: Checksum validation failed." >&2 + rm -rf "$TMP_DIR" + exit 1 + fi + elif command -v shasum >/dev/null 2>&1; then + if (cd "$TMP_DIR" && shasum -a 256 -c --ignore-missing SHA256SUMS.txt >/dev/null 2>&1); then + echo "✓ Checksum validated" + else + echo "Error: Checksum validation failed." >&2 + rm -rf "$TMP_DIR" + exit 1 + fi + else + echo "Warning: No sha256sum or shasum found, skipping checksum validation." + fi +fi + +# Check that the file is a valid tarball +if ! tar -tzf "$TMP_TARBALL" >/dev/null 2>&1; then + echo "Error: Downloaded file is not a valid tarball or is corrupted." >&2 + rm -rf "$TMP_DIR" + exit 1 +fi + +# Check if running as root, fallback to non-root +if [ "$(id -u 2>/dev/null || echo 1)" -eq 0 ]; then + PREFIX="${PREFIX:-/usr/local}" +else + PREFIX="${PREFIX:-$HOME/.local}" +fi +INSTALL_DIR="$PREFIX/bin" +if ! mkdir -p "$INSTALL_DIR"; then + echo "Error: Could not create directory $INSTALL_DIR. You may not have write permissions." >&2 + echo "Try running this script with sudo or set PREFIX to a directory you own (e.g., export PREFIX=\$HOME/.local)." >&2 + exit 1 +fi + +# Install binary +if [ -f "$INSTALL_DIR/copilot" ]; then + echo "Notice: Replacing copilot binary found at $INSTALL_DIR/copilot." +fi +tar -xz -C "$INSTALL_DIR" -f "$TMP_TARBALL" +chmod +x "$INSTALL_DIR/copilot" +echo "✓ GitHub Copilot CLI installed to $INSTALL_DIR/copilot" +rm -rf "$TMP_DIR" + +# Check if install directory is in PATH +case ":$PATH:" in + *":$INSTALL_DIR:"*) ;; + *) + echo "" + echo "Warning: $INSTALL_DIR is not in your PATH" + echo "Add it to your PATH by adding this line to your shell profile:" + echo " export PATH=\"\$PATH:$INSTALL_DIR\"" + ;; +esac + +echo "" +echo "Installation complete! Run 'copilot help' to get started." diff --git a/.snapshots/config.json b/.snapshots/config.json new file mode 100644 index 00000000..a0c30ecd --- /dev/null +++ b/.snapshots/config.json @@ -0,0 +1,152 @@ +{ + "excluded_patterns": [ + ".git", + ".gitignore", + "gradle", + "gradlew", + "gradlew.*", + "node_modules", + ".snapshots", + ".idea", + ".vscode", + "*.log", + "*.tmp", + "target", + "dist", + "build", + ".DS_Store", + "*.bak", + "*.swp", + "*.swo", + "*.lock", + "*.iml", + "coverage", + "*.min.js", + "*.min.css", + "__pycache__", + ".marketing", + ".env", + ".env.*", + "*.jpg", + "*.jpeg", + "*.png", + "*.gif", + "*.bmp", + "*.tiff", + "*.ico", + "*.svg", + "*.webp", + "*.psd", + "*.ai", + "*.eps", + "*.indd", + "*.raw", + "*.cr2", + "*.nef", + "*.mp4", + "*.mov", + "*.avi", + "*.wmv", + "*.flv", + "*.mkv", + "*.webm", + "*.m4v", + "*.wfp", + "*.prproj", + "*.aep", + "*.psb", + "*.xcf", + "*.sketch", + "*.fig", + "*.xd", + "*.db", + "*.sqlite", + "*.sqlite3", + "*.mdb", + "*.accdb", + "*.frm", + "*.myd", + "*.myi", + "*.ibd", + "*.dbf", + "*.rdb", + "*.aof", + "*.pdb", + "*.sdb", + "*.s3db", + "*.ddb", + "*.db-shm", + "*.db-wal", + "*.sqlitedb", + "*.sql.gz", + "*.bak.sql", + "dump.sql", + "dump.rdb", + "*.vsix", + "*.jar", + "*.war", + "*.ear", + "*.zip", + "*.tar", + "*.tar.gz", + "*.tgz", + "*.rar", + "*.7z", + "*.exe", + "*.dll", + "*.so", + "*.dylib", + "*.app", + "*.dmg", + "*.iso", + "*.msi", + "*.deb", + "*.rpm", + "*.apk", + "*.aab", + "*.ipa", + "*.pkg", + "*.nupkg", + "*.snap", + "*.whl", + "*.gem", + "*.pyc", + "*.pyo", + "*.pyd", + "*.class", + "*.o", + "*.obj", + "*.lib", + "*.a", + "*.map", + ".npmrc" + ], + "default": { + "default_prompt": "Enter your prompt here", + "default_include_all_files": false, + "default_include_entire_project_structure": true + }, + "included_patterns": [ + "build.gradle", + "settings.gradle", + "gradle.properties", + "pom.xml", + "Makefile", + "CMakeLists.txt", + "package.json", + "requirements.txt", + "Pipfile", + "Gemfile", + "composer.json", + ".editorconfig", + ".eslintrc.json", + ".eslintrc.js", + ".prettierrc", + ".babelrc", + ".dockerignore", + ".gitattributes", + ".stylelintrc", + ".npmrc" + ".xai" + ] +} \ No newline at end of file diff --git a/.snapshots/readme.md b/.snapshots/readme.md new file mode 100644 index 00000000..21fa917d --- /dev/null +++ b/.snapshots/readme.md @@ -0,0 +1,11 @@ +# Snapshots Directory + +This directory contains snapshots of your code for AI interactions. Each snapshot is a markdown file that includes relevant code context and project structure information. + +## What's included in snapshots? +- Selected code files and their contents +- Project structure (if enabled) +- Your prompt/question for the AI + +## Configuration +You can customize snapshot behavior in `config.json`. diff --git a/.snapshots/snapshot-2025-12-22T13_14_58_831Z.md b/.snapshots/snapshot-2025-12-22T13_14_58_831Z.md new file mode 100644 index 00000000..c68874c1 --- /dev/null +++ b/.snapshots/snapshot-2025-12-22T13_14_58_831Z.md @@ -0,0 +1,18 @@ +Enter your prompt here + +# Project Structure + +├─ 📁 .ipynb_checkpoints + └─ Untitled-checkpoint.ipynb + └─ install-checkpoint.sh +└─ README.md +└─ Untitled.ipynb +└─ changelog.md +└─ install.sh +└─ LICENSE.md + + +# Project Files + +- home/codespace/.vscode-remote/data/Machine/settings.json + diff --git a/.snapshots/sponsors.md b/.snapshots/sponsors.md new file mode 100644 index 00000000..2df337f4 --- /dev/null +++ b/.snapshots/sponsors.md @@ -0,0 +1,44 @@ +# Thank you for using Snapshots for AI + +Thanks for using Snapshots for AI. We hope this tool has helped you solve a problem or two. + +If you would like to support our work, please help us by considering the following offers and requests: + +## Ways to Support + +### Join the GBTI Network!!! 🙏🙏🙏 +The GBTI Network is a community of developers who are passionate about open source and community-driven development. Members enjoy access to exclussive tools, resources, a private MineCraft server, a listing in our members directory, co-op opportunities and more. + +- Support our work by becoming a [GBTI Network member](https://gbti.network/membership/). + +### Try out BugHerd 🐛 +BugHerd is a visual feedback and bug-tracking tool designed to streamline website development by enabling users to pin feedback directly onto web pages. This approach facilitates clear communication among clients, designers, developers, and project managers. + +- Start your free trial with [BugHerd](https://partners.bugherd.com/55z6c8az8rvr) today. + +### Hire Developers from Codeable 👥 +Codeable connects you with top-tier professionals skilled in frameworks and technologies such as Laravel, React, Django, Node, Vue.js, Angular, Ruby on Rails, and Node.js. Don't let the WordPress focus discourage you. Codeable experts do it all. + +- Visit [Codeable](https://www.codeable.io/developers/?ref=z8h3e) to hire your next team member. + +### Lead positive reviews on our marketplace listing ⭐⭐⭐⭐⭐ +- Rate us on [VSCode marketplace](https://marketplace.visualstudio.com/items?itemName=GBTI.snapshots-for-ai) +- Review us on [Cursor marketplace](https://open-vsx.org/extension/GBTI/snapshots-for-ai) + +### Star Our GitHub Repository ⭐ +- Star and watch our [repository](https://github.com/gbti-network/vscode-snapshots-for-ai) + +### 📡 Stay Connected +Follow us on your favorite platforms for updates, news, and community discussions: +- **[Twitter/X](https://twitter.com/gbti_network)** +- **[GitHub](https://github.com/gbti-network)** +- **[YouTube](https://www.youtube.com/channel/UCh4FjB6r4oWQW-QFiwqv-UA)** +- **[Dev.to](https://dev.to/gbti)** +- **[Daily.dev](https://dly.to/zfCriM6JfRF)** +- **[Hashnode](https://gbti.hashnode.dev/)** +- **[Discord Community](https://gbti.network)** +- **[Reddit Community](https://www.reddit.com/r/GBTI_network)** + +--- + +Thank you for supporting open source software! 🙏 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..e809264e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + + { + "type": "idl", + "name": "Launch IDL", + "request": "launch" + }, + { + "name": "Python Debugger: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + }, + + { + "type": "idl", + "name": "Launch IDL", + "request": "launch" + } + ] +} diff --git a/README.md b/README.md index 347cf2dc..a0cdbf2f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ We're still early in our journey, but with your feedback, we're rapidly iteratin ### Prerequisites - (On Windows) **PowerShell** v6 or higher -- An **active Copilot subscription**. See [Copilot plans](https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=install-copilot-cli&ref_page=docs). +- An **active Copilot subscription**. See [Copilot plans](https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signu6p&ref_loc=install-copilot-cli&ref_page=docs). If you have access to GitHub Copilot via your organization or enterprise, you cannot use GitHub Copilot CLI if your organization owner or enterprise administrator has disabled it in the organization or enterprise settings. See [Managing policies and features for GitHub Copilot in your organization](http://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/managing-policies-for-copilot-in-your-organization) for more information. diff --git a/Revise.prompt.yml b/Revise.prompt.yml new file mode 100644 index 00000000..e1b3c636 --- /dev/null +++ b/Revise.prompt.yml @@ -0,0 +1,2 @@ +messages: [] +model: microsoft/phi-4-multimodal-instruct diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..034e8480 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. diff --git a/Tijuks.github b/Tijuks.github new file mode 100644 index 00000000..01502b13 --- /dev/null +++ b/Tijuks.github @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. diff --git a/Untitled.ipynb b/Untitled.ipynb new file mode 100644 index 00000000..f5ea3dea --- /dev/null +++ b/Untitled.ipynb @@ -0,0 +1,29 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "de9faa9c", + "metadata": {}, + "outputs": [], + "source": [ + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.12.1" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/effective guacamole.api.gh b/effective guacamole.api.gh new file mode 100644 index 00000000..9598f09f --- /dev/null +++ b/effective guacamole.api.gh @@ -0,0 +1,64 @@ +# @title AI prompt cell + +import ipywidgets as widgets +from IPython.display import display, HTML, Markdown,clear_output +from google.colab import ai + +dropdown = widgets.Dropdown( + options=[], + layout={'width': 'auto'} +) + +def update_model_list(new_options): + dropdown.options = new_options + update_model_list(ai.list_models()) + + text_input = widgets.Textarea( + placeholder='Ask me anything....', + layout={'width': 'auto', 'height': '100px'}, + ) + + button = widgets.Button( + description='Submit Text', + disabled=False, + tooltip='Click to submit the text', + icon='check' + ) + + output_area = widgets.Output( + layout={'width': 'auto', 'max_height': '300px','overflow_y': 'scroll'} + ) + + def on_button_clicked(b): + with output_area: + output_area.clear_output(wait=False) + accumulated_content = "" + for new_chunk in ai.generate_text(prompt=text_input.value, model_name=dropdown.value, stream=True): + if new_chunk is None: + continue + accumulated_content += new_chunk + clear_output(wait=True) + display(Markdown(accumulated_content)) + + button.on_click(on_button_clicked) + vbox = widgets.GridBox([dropdown, text_input, button, output_area]) + + display(HTML(""" + + """)) + display(vbox) + } + })) + ) + ) + ) +) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..49cf0ce0 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "copilot-cli", + "version": "1.0.0", + "description": "Copilot CLI with Azure integration", + "main": "index.js", + "scripts": { + "build": "webpack --mode production", + "dev": "webpack serve --mode development", + "start": "node index.js", + "watch": "webpack --watch" + }, + "dependencies": { + "@azure/storage-blob": "^12.15.0", + "@azure/identity": "^3.2.0" + }, + "devDependencies": { + "webpack": "^5.89.0", + "webpack-cli": "^5.1.0", + "webpack-dev-server": "^4.15.1", + "@types/node": "^20.8.0" + }, + "keywords": ["copilot", "cli", "azure"], + "author": "tijuks", + "license": "ISC" +} \ No newline at end of file diff --git a/package_Version2.json b/package_Version2.json new file mode 100644 index 00000000..11eea9de --- /dev/null +++ b/package_Version2.json @@ -0,0 +1,25 @@ +{ + "name": "copilot-cli", + "version": "1.0.0", + "description": "Copilot CLI with Azure integration", + "main": "index.js", + "scripts": { + "build": "webpack --mode production", + "dev": "webpack serve --mode development", + "start": "node index.js", + "watch": "webpack --watch" + }, + "dependencies": { + "@azure/storage-blob": "^12.15.0", + "@azure/identity": "^3.2.0" + }, + "devDependencies": { + "webpack": "^5.89.0", + "webpack-cli": "^5.1.0", + "webpack-dev-server": "^4.15.1", + "@types/node": "^20.8.0" + }, + "keywords": ["copilot", "cli", "azure"], + "author": "tijuks", + "license": "ISC" +} \ No newline at end of file diff --git a/webpack.config_Version2.js b/webpack.config_Version2.js new file mode 100644 index 00000000..190c7308 --- /dev/null +++ b/webpack.config_Version2.js @@ -0,0 +1,29 @@ +const path = require('path'); + +module.exports = { + entry: './src/index.js', + output: { + filename: 'bundle.js', + path: path.resolve(__dirname, 'dist'), + }, + mode: 'development', + devServer: { + static: path.join(__dirname, 'dist'), + port: 3000, + hot: true, + }, + module: { + rules: [ + { + test: /\.js$/, + exclude: /node_modules/, + use: { + loader: 'babel-loader', + }, + }, + ], + }, + resolve: { + extensions: ['.js', '.json'], + }, +}; \ No newline at end of file