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

Uni diff #100

Merged
merged 15 commits into from
Oct 16, 2023
Merged

Uni diff #100

merged 15 commits into from
Oct 16, 2023

Conversation

pelikhan
Copy link
Member

No description provided.

const m = /^(```+)[\w\-]*\s*$/.exec(text)
if (m) return m[1]
if (m) return m[1].replace(/\s*$/, "")

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of ' '.
const lines = text.split(/\r?\n/)
for (let i = 0; i < lines.length; ++i) {
const line = lines[i]

if (currFence) {
if (line === currFence) {
if (line.replace(/\s*$/, "") === currFence) {

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of ' '.
@pelikhan pelikhan merged commit a170208 into main Oct 16, 2023
4 checks passed
@pelikhan pelikhan deleted the unidiff branch October 16, 2023 21:43
lemmy pushed a commit that referenced this pull request Mar 19, 2024
* split system prompt

* don't ignore vscode settings

* udpated devicescript

* fix expander to support diffs

* adding diff parser

* updated example

* adding diff test

* more work on diff

* apply diffs

* more diff application

* more diff fixing

* refactor diff into system prompt

* test adding summarized code

* fixing date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant