Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rewrite openai with Swift #308

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7998646
refactor: add OpenAIService in Swift
tisfeng Jan 1, 2024
766e77c
chore: add libray OpenAI
tisfeng Jan 1, 2024
7bd226f
feat: able to translate text in chat completions
tisfeng Jan 2, 2024
cabd944
feat: change to use chat stream
tisfeng Jan 2, 2024
619bd59
chore: use forked OpenAI package, change Choice index to optional, fi…
tisfeng Jan 2, 2024
788d6f4
add ali translate support (#294)
choykarl Jan 1, 2024
42263e3
docs: update README
tisfeng Jan 2, 2024
59de4ef
docs: update README
tisfeng Jan 2, 2024
f5b1152
perf: improve prompt
tisfeng Jan 3, 2024
756af91
perf: improve prompt
tisfeng Jan 3, 2024
5cc15b1
perf: set gpt-3.5-turbo-1106 as default model
tisfeng Jan 3, 2024
792ea08
bugfix: menu item alignment issue (#299)
phlpsong Jan 3, 2024
85b6069
bugfix: #302 placeholder text not fully display in mini window (#303)
phlpsong Jan 4, 2024
12b5a7a
docs: update README
tisfeng Jan 4, 2024
5ff5803
perf: increase Niutrans free quota to 800w
tisfeng Jan 4, 2024
6263bb0
chore: update app version to 2.5.0
tisfeng Jan 4, 2024
8a0df85
chore: update appcast.xml
tisfeng Jan 4, 2024
1fc1e32
bugfix: app language not follow language updates in system settings …
phlpsong Jan 5, 2024
e0ce1f5
fix: resolve warning in release mode
tisfeng Jan 5, 2024
c0a7e0d
Create swift.yml
tisfeng Jan 5, 2024
21faf88
Create codeql.yml
tisfeng Jan 5, 2024
bd37333
Revert "Create codeql.yml"
tisfeng Jan 5, 2024
fb00a45
Create codeql.yml
tisfeng Jan 5, 2024
2f075f8
chore: set xcode version to 15.1
tisfeng Jan 5, 2024
db85086
chore: fix indentation error
tisfeng Jan 5, 2024
b22ef5d
chore: set image to macos-13
tisfeng Jan 5, 2024
2e05309
chore: only set xcode if language is swfit
tisfeng Jan 5, 2024
4a4ca34
refactor: add OpenAIService in Swift
tisfeng Jan 1, 2024
29357db
Merge branch 'dev' into refactor-openai
tisfeng Jan 6, 2024
2fb666c
test ci
tisfeng Jan 6, 2024
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
Prev Previous commit
Next Next commit
Create codeql.yml
  • Loading branch information
tisfeng committed Jan 6, 2024
commit 21faf8890d8cad925853bfdf54b3ec77459f923f
81 changes: 81 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
schedule:
- cron: '20 18 * * 3'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'javascript-typescript', 'ruby', 'swift' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"