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

working vscode #622

Merged
merged 494 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
494 commits
Select commit Hold shift + click to select a range
2fdd6d6
fix it
sxlijin May 11, 2024
d81501d
fix more
sxlijin May 11, 2024
ad3ed36
fix this
sxlijin May 11, 2024
8b960c1
builder
hellovai May 11, 2024
3818b99
upgrade back up
sxlijin May 11, 2024
55a60ac
Anthropic client wip
aaronvg May 10, 2024
3268adb
Add anthropic client, with proxy in nextjs
aaronvg May 11, 2024
026a343
events are uploaded
hellovai May 11, 2024
45e30f5
Add more info to unrechable rust errors
aaronvg May 12, 2024
05bed8d
Add support for tests directly in BAML
hellovai May 12, 2024
9de096d
Add tests for wasm code in rust
aaronvg May 12, 2024
f131412
add logging of wasm and rust
aaronvg May 13, 2024
55fed9a
add panic hoook
aaronvg May 13, 2024
bc6b936
dont make debug=true on releases on schema wasm
aaronvg May 13, 2024
7c538b8
Add webcrypto initialization to node for getrandom in rust to use to …
aaronvg May 13, 2024
6f0da11
fix playground not reloading when closing and opening it
aaronvg May 13, 2024
edeef78
remove todo from runtime
hellovai May 13, 2024
032607b
put everything in dist when building
sxlijin May 11, 2024
65c1440
commit the WIP code for ts image support
sxlijin May 13, 2024
d223cc6
fix types
sxlijin May 13, 2024
0156e31
implement eventsource proof of concept
sxlijin May 13, 2024
dcddceb
anthropic proxy server
aaronvg May 14, 2024
86b97ae
working anthropic in vscode
aaronvg May 14, 2024
820b387
fix some llm provider validations, prep ollama
aaronvg May 14, 2024
25c897b
cancellable stream
sxlijin May 14, 2024
a5989d1
demonstrate cancellable stream working
sxlijin May 14, 2024
6bf01e2
stream cancellation impl
sxlijin May 14, 2024
e0704cd
more streaming stuff
sxlijin May 14, 2024
db36a0c
clean up code a little bit
sxlijin May 14, 2024
1ff4ca6
pt 1 of streaming impl
sxlijin May 14, 2024
d9b91e0
delete a bunch fo dead code
sxlijin May 14, 2024
2c54e53
commit a bunch
sxlijin May 14, 2024
a4b6d7a
silence more dead code warnings
sxlijin May 14, 2024
564a53c
get the python-facing streaming interface implemented
sxlijin May 14, 2024
fa5a3cf
Use better deserializer
hellovai May 15, 2024
07417d5
Migrated to new request
hellovai May 15, 2024
158c672
Fixed minor
hellovai May 15, 2024
9bec60e
Improve latency visualizations
hellovai May 15, 2024
cfd3aa5
partially working openai stream interface
sxlijin May 15, 2024
e0e4f8d
build it all
sxlijin May 15, 2024
de8996f
rip out ResponseType
sxlijin May 15, 2024
b687949
actually rip it out
sxlijin May 15, 2024
24f60c9
it compiles
sxlijin May 15, 2024
b93221d
stream wrapper is wired up
sxlijin May 15, 2024
2a115f7
cancellable stream
sxlijin May 15, 2024
0abbde4
python callbacks work
sxlijin May 16, 2024
e867d78
more stream impl
sxlijin May 16, 2024
3b8b903
add safeguard to file deletion
sxlijin May 16, 2024
fbf7961
fix it
sxlijin May 16, 2024
8e2a5c1
Orchestrator works with round robing
hellovai May 17, 2024
398b8c8
merged w/ streaming!
hellovai May 17, 2024
85e94ba
better impl of remove_dir_safe
sxlijin May 16, 2024
003b134
python codegen changes
sxlijin May 17, 2024
56d082b
integ-tests2
sxlijin May 17, 2024
8615e53
exa
sxlijin May 17, 2024
4883ade
generated baml_client
sxlijin May 17, 2024
dcac152
Fixed escaped strings
hellovai May 17, 2024
f529f1f
Fixed escaped strings
hellovai May 17, 2024
6f55e5c
more stash progress
sxlijin May 17, 2024
81d381e
upgrade pyo3 to bound
sxlijin May 17, 2024
f56094b
streaming codegen done
sxlijin May 18, 2024
87a47d8
delete old client tests
sxlijin May 18, 2024
c6fc350
delete the old CLIs
sxlijin May 18, 2024
d28ee10
update the root gitignore
sxlijin May 18, 2024
75a347b
remove old CLIs
sxlijin May 18, 2024
8fc47aa
one lint
sxlijin May 18, 2024
da44c49
rip out dead prototype code
sxlijin May 18, 2024
2899f8c
fix warning
sxlijin May 18, 2024
6b13e43
rip out a bunch of unused imports/vars
sxlijin May 18, 2024
f8496b7
rip out some more
sxlijin May 18, 2024
27a850d
Update devDependencies in package.json files
anish-palakurthi May 20, 2024
39c5f9c
Events stream up correctly from wasm runtimes (prompt fiddle + vscode)
hellovai May 20, 2024
263e241
Add support for partial deserializer
hellovai May 21, 2024
683067a
stash partially working
sxlijin May 20, 2024
0349cc8
Streaming complete!
hellovai May 21, 2024
5b1426c
Fix runtime compilation
hellovai May 21, 2024
57a098f
add latency numbers
sxlijin May 21, 2024
0ff2584
wire up anthropic metadata
sxlijin May 21, 2024
ac778f3
make more work
sxlijin May 21, 2024
f3028d8
set font-mono
sxlijin May 21, 2024
6c13cae
propagate errors out of streams kinda
sxlijin May 22, 2024
46825b1
Fix test results not showing up correctly in the table
aaronvg May 15, 2024
522a8c0
Fix anthropic client stream not working
aaronvg May 22, 2024
b11ceb7
Add test syntax highlight
aaronvg May 22, 2024
ff8a24f
UI tweaks on adding tests
aaronvg May 22, 2024
759dca3
Jump2def for vscode-extension (#614)
anish-palakurthi May 22, 2024
fe60103
more ui fixes
aaronvg May 22, 2024
8a7638a
show errors in promptfiddle
aaronvg May 22, 2024
827d610
more tweaks
aaronvg May 22, 2024
ec539d9
Hover to show definition works (#616)
anish-palakurthi May 22, 2024
107aa02
Add open playground codelens
aaronvg May 22, 2024
0e18892
Add persistent env var storage across sessions
aaronvg May 22, 2024
a7b8102
fix open playground button not selecting right function
aaronvg May 22, 2024
f100991
remove dead code
aaronvg May 22, 2024
3a02063
streaming completed
hellovai May 23, 2024
785117a
swap to target = "wasm32" isntead of feature = "wasm"
hellovai May 23, 2024
5d26b63
expose new generator struct
sxlijin May 22, 2024
625e61a
fix more build
sxlijin May 23, 2024
940f184
Fix build break
hellovai May 23, 2024
a6c740e
add lib back into gitignore
sxlijin May 23, 2024
3bdb374
run tsc on build of language server
aaronvg May 23, 2024
923ca0e
run tsc in vscode package
aaronvg May 23, 2024
0fe228a
run tsc --noemit on web panel
aaronvg May 23, 2024
78561be
oops
sxlijin May 23, 2024
0f73edb
Build partially working
hellovai May 23, 2024
f9a1768
Fixed compile break!
hellovai May 23, 2024
68ac4ba
Style fixes in promptfiddle
aaronvg May 23, 2024
5ee20b1
Playground function swaps with cursor location (#617)
anish-palakurthi May 23, 2024
fd33a0f
Fix prompt fiddle files not updating
aaronvg May 23, 2024
73a5d3a
Adding @trace to python code
hellovai May 23, 2024
8c46d23
Fix syntax highlight bugs, change tests to use new test format
aaronvg May 23, 2024
175cfc7
only add anthropic proxy url in vscode, not in promptfiddle
aaronvg May 23, 2024
46f5919
Fix anthropic in promptfiddle with a proxy
aaronvg May 23, 2024
c233d9e
adjust readonly banner
aaronvg May 23, 2024
d80b45e
more tweaks
aaronvg May 23, 2024
057b7a5
Fixed playground function swapping based on click (#619)
anish-palakurthi May 23, 2024
6583cf7
ui tweak
aaronvg May 23, 2024
8806abd
add auto codegen into vscode
sxlijin May 23, 2024
a11ef32
add another relpath computation
sxlijin May 24, 2024
c4e8428
add comments
sxlijin May 24, 2024
99085df
minor css tweaks
aaronvg May 24, 2024
9a68636
add partial_types
sxlijin May 24, 2024
1fa2ba8
tweak
aaronvg May 24, 2024
e834e9c
change proxy port
aaronvg May 24, 2024
2489333
fix server port, and pnpm issue
aaronvg May 24, 2024
3afe7d8
try to fix the language-client-ts breakage
sxlijin May 24, 2024
9890fd8
try fix npm publish
aaronvg May 24, 2024
96d03cd
fix ts action
aaronvg May 25, 2024
d077753
correctly do things
hellovai May 25, 2024
93ca95f
yes please
aaronvg May 25, 2024
e4eebee
new build stuff
aaronvg May 25, 2024
2d3e27c
Autocomplete for role, ctx (#620)
anish-palakurthi May 25, 2024
a21ca56
another try
aaronvg May 25, 2024
aa49846
ts 0.0.5
aaronvg May 25, 2024
11cf8f6
Include dist folder
hellovai May 25, 2024
75c8eed
Trying 0.0.7
hellovai May 25, 2024
f57c24c
real commit 0.0.7
hellovai May 25, 2024
a7ec6c0
include native.js
hellovai May 25, 2024
5341a84
only darwin
hellovai May 25, 2024
296f5eb
only darwin 4real
hellovai May 25, 2024
8252fb6
disable linux testing
hellovai May 25, 2024
c80ce79
finally works!
hellovai May 25, 2024
42a33f5
ts 0.0.9 include linux
aaronvg May 25, 2024
3de67c3
updating logs
hellovai May 25, 2024
946417c
update workflow
hellovai May 25, 2024
c4ca51a
streaming works!
hellovai May 25, 2024
320ee04
inline baml files into generated dir for TS
aaronvg May 26, 2024
cda5a21
ts 0.0.12
aaronvg May 26, 2024
7818147
ts 0.0.13
aaronvg May 26, 2024
59c1937
Fixing stability issues
hellovai May 26, 2024
d1b02e6
0.0.14
hellovai May 26, 2024
0c96964
Add invocation params + hiding of heads
hellovai May 26, 2024
2a3b55a
Update CLI to work for npm and python
hellovai May 26, 2024
3b27921
Update to node 0.0.16
hellovai May 26, 2024
c5560ae
fix python build
aaronvg May 26, 2024
7330248
Update CLI
hellovai May 26, 2024
fb41bd7
Updated CLI
hellovai May 27, 2024
f79321a
prep new vscode extension with Boundary publisher
aaronvg May 27, 2024
a12190a
Updated all generated code
hellovai May 27, 2024
9d6af00
Updating log statements
hellovai May 27, 2024
b879c5a
Update generated code
hellovai May 27, 2024
7e5bf1e
fix integ tests
aaronvg May 27, 2024
a289864
more changes
aaronvg May 27, 2024
efdcf98
Adding support for azure
hellovai May 27, 2024
adedd18
Fixed bool parameters in tests + optional paramters in tests
hellovai May 27, 2024
9ab3bf3
Provider better errors for test paramter parsing
hellovai May 27, 2024
3a0db6c
Should work!
hellovai May 27, 2024
85569ea
minor doc updates
hellovai May 27, 2024
5abb467
add azure client
aaronvg May 27, 2024
17e2a9a
add some more tests
aaronvg May 27, 2024
1dbed44
add ollama test
aaronvg May 27, 2024
553d3d4
fix bug with error serializing log api response
aaronvg May 27, 2024
39f43b3
Fix names of interfaces in ts and py, and make all optionals by defau…
aaronvg May 27, 2024
04a3125
fix log posting error
aaronvg May 27, 2024
03f60b3
small tweak
aaronvg May 27, 2024
d16d012
more changes
aaronvg May 28, 2024
37cc519
Adding support for passing in neccessary components for dynamic types…
hellovai May 28, 2024
60f0169
more test in tyepscript
aaronvg May 28, 2024
bd1d9b9
Fix issue with aliases
hellovai May 28, 2024
7db3dd6
add more integ tests
aaronvg May 28, 2024
1d3de21
fix runtime name bug
aaronvg May 28, 2024
b9679f3
more fix
aaronvg May 28, 2024
1013c1e
one more fix
aaronvg May 28, 2024
3c64567
more name fix
aaronvg May 28, 2024
4f1ce17
Working code for aliases and prompts
hellovai May 28, 2024
b64f6a6
compilation fix
hellovai May 28, 2024
a26c49b
Fixed comment so it includes space on new lines
hellovai May 28, 2024
4ea48e7
Fixed int bug
hellovai May 28, 2024
cd73d85
add retry to tests
aaronvg May 28, 2024
d52673b
Add python tests
aaronvg May 28, 2024
398530a
add new test files
aaronvg May 28, 2024
e5a5aa7
reenable ts tests
aaronvg May 28, 2024
d0f8a98
ts 0.0.22
aaronvg May 28, 2024
4ec02d4
change extension to baml-preview
aaronvg May 28, 2024
cb8e5d6
Add tests pass in JS
hellovai May 28, 2024
60a28c4
updated code
hellovai May 28, 2024
9e33304
fix flush and trace functions not being bound to ctx in ts
aaronvg May 28, 2024
9b5ab99
done -> getFinalResponse
sxlijin May 28, 2024
523d859
purge integ-tests2, unused now
sxlijin May 28, 2024
87f00fb
fix python streaming
sxlijin May 28, 2024
020f602
make it all build again
sxlijin May 28, 2024
4e3c980
Python types work!
hellovai May 28, 2024
5c156a9
Update log
hellovai May 28, 2024
6e9161d
Fix streaming bug
hellovai May 28, 2024
e0f2ed0
Update ref counter
hellovai May 28, 2024
1dade44
rm integ-tests2 from workspace
sxlijin May 28, 2024
4442cdd
fix lang-client-ts, add streaming tests
sxlijin May 28, 2024
994a866
ts 0.0.23
aaronvg May 28, 2024
4da4ffd
delete baml-core-ffi
hellovai May 28, 2024
6b8345e
fixing cargo.toml
hellovai May 28, 2024
ae17287
Revert adding gitignore for ts client package
aaronvg May 28, 2024
3a60506
fix upsert tags
aaronvg May 29, 2024
1297f87
Codelenses for python and typescript (#623)
anish-palakurthi May 29, 2024
779b303
Add TS tracing integ tests
aaronvg May 29, 2024
513186a
make codegen stable
sxlijin May 28, 2024
4a0e9db
commit all changes
sxlijin May 29, 2024
9790991
some more stuff for ruby
sxlijin May 29, 2024
a91a2d2
fix typescript tracing
aaronvg May 29, 2024
f298361
Fixed end of function swapping bug (#624)
anish-palakurthi May 29, 2024
3c7fdb9
Fix tracing for python and ts
aaronvg May 29, 2024
0195ff7
fix wasm build error
aaronvg May 29, 2024
44b0b83
Another fix
aaronvg May 29, 2024
f9ada13
new baml extension
aaronvg May 29, 2024
1a88dbf
ts 0.0.25
aaronvg May 29, 2024
615369f
Fix json parser
aaronvg May 29, 2024
d0fb917
ts 0.0.26
aaronvg May 29, 2024
693bb10
ts 0.0.27
aaronvg May 30, 2024
956000a
fix test
aaronvg May 30, 2024
d5a71e6
add some more deserializer test cases
aaronvg May 30, 2024
eb4f13e
Add support for dynamic classes and enums (#626)
hellovai May 30, 2024
18e2652
Preparing for release 0.30.0
hellovai May 30, 2024
72f4a67
Fix bug in PYI for language
hellovai May 30, 2024
8a44059
include license
hellovai May 30, 2024
4a0df4c
Fixed support for dashmap in WASM
hellovai May 30, 2024
e909f2a
Update some changes for python
hellovai May 30, 2024
9705f93
Update python release
hellovai May 30, 2024
fb90900
Fix empty enum bug
hellovai May 30, 2024
4e30ffa
support users passing arbirtrary data models
hellovai May 30, 2024
ef4b430
Patch to allow for any python ojects
hellovai May 30, 2024
8cdbb95
Fix jsonish bug in object
hellovai May 31, 2024
c18f7e0
Updating release to 0.31.0
hellovai May 31, 2024
f8c700b
fix windows path issues
aaronvg May 31, 2024
e0e6def
vscode 0.31.1
aaronvg May 31, 2024
9f2a920
Fix issue with unions parsing
hellovai May 31, 2024
7ae02cd
Release 0.32.0
hellovai May 31, 2024
6e2ab09
vscode 0.32.2 windows fix2
aaronvg May 31, 2024
0091139
Revert version back to 0.32.0 for vscode
hellovai May 31, 2024
e552976
webview should not steal focus on open
aaronvg May 31, 2024
6b93786
Update .pyi file to match the rust (python 0.32.1)
hellovai May 31, 2024
acbd24f
Merge branch 'canary' into working-vscode
aaronvg May 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 17 additions & 4 deletions .github/workflows/release_language_client_python.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Release language_client_python

on:
push:
branches: ["canary"]
workflow_dispatch: {}

permissions:
contents: read
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
fail-fast: false
matrix:
_:
- runs_on: ubuntu-latest
Expand Down Expand Up @@ -48,6 +55,13 @@ jobs:
args: --release --out engine/language_client_python/dist --manifest-path engine/language_client_python/Cargo.toml
sccache: "true"
manylinux: ${{ matrix._.runs_on == 'ubuntu-latest' && 'auto' || null }}
before-script-linux: |
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config
fi

- name: Upload wheels
uses: actions/upload-artifact@v4
Expand All @@ -58,14 +72,13 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/release/')
environment: release

#if: startsWith(github.ref, 'refs/tags/release/')
#environment: release
steps:
- uses: actions/download-artifact@v4
- run: mkdir dist && mv wheels-*/* dist

# authz is managed via OIDC configured at https://pypi.org/manage/project/baml-py/settings/publishing/
# it is pinned to this filename, so renaming this file is not safe!!: release_python_ffi.yaml
# it is pinned to this github actions filename, so renaming this file is not safe!!
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
138 changes: 138 additions & 0 deletions .github/workflows/release_language_client_ruby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Release engine/language_client_ruby

on:
workflow_dispatch: {}
#push:
# branches:
# - sam/rust-llm

permissions:
contents: read
id-token: write

jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- x86_64-linux
- aarch64-linux
- x86_64-darwin
- arm64-darwin
#- x64-mingw-ucrt

runs-on: ubuntu-latest
steps:
- uses: rubygems/configure-rubygems-credentials@main
with:
# https://rubygems.org/profile/oidc/api_key_roles/rg_oidc_akr_p6x4xz53qtk948na3bgy
role-to-assume: rg_oidc_akr_p6x4xz53qtk948na3bgy

- uses: actions/checkout@v4

- run: cd engine/language_client_ruby

- uses: oxidize-rb/actions/setup-ruby-and-rust@main
with:
rubygems: latest
ruby-version: "3.3"
bundler-cache: false
cargo-cache: false
cargo-vendor: false

#################################################################################################################
#
# BEGIN: these steps are copied from https://github.com/oxidize-rb/actions/blob/main/cross-gem/action.yml
#
# We can't use oxidize-rb/actions/cross-gem@main directly, unfortunately, because our Ruby FFI lib is a member
# of the top-level workspace, and we need to do stuff to make rb-sys-dock play nice with it
#
#################################################################################################################

- name: Configure environment
shell: bash
id: configure
run: |
: Configure environment
echo "RB_SYS_DOCK_UID=$(id -u)" >> $GITHUB_ENV
echo "RB_SYS_DOCK_GID=$(id -g)" >> $GITHUB_ENV
rb_sys_version="$((grep rb_sys Gemfile.lock | head -n 1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') || (gem info rb_sys --remote | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') || echo "latest")"
rb_sys_dock_cache_dir="$HOME/.cache/rb-sys-$rb_sys_version"
mkdir -p "$rb_sys_dock_cache_dir"
echo "RB_SYS_DOCK_CACHE_DIR=$rb_sys_dock_cache_dir" >> $GITHUB_ENV
echo "rb_sys_version=$rb_sys_version" >> $GITHUB_OUTPUT

#- name: Setup caching
# uses: actions/cache@v4
# with:
# path: |
# ${{ env.RB_SYS_DOCK_CACHE_DIR }}
# tmp/rb-sys-dock/${{ inputs.platform }}/target
# key: rb-sys-dock-${{ inputs.cache-version }}-${{ inputs.platform }}-${{ hashFiles('**/Gemfile.lock', '**/Cargo.lock') }}
# save-always: ${{ inputs.cache-save-always == 'true' }}
# restore-keys: |
# rb-sys-dock-${{ inputs.cache-version }}-${{ inputs.platform }}-

#- name: Install cargo-cache
# uses: oxidize-rb/actions/cargo-binstall@v1
# id: install-cargo-cache
# if: inputs.cargo-cache-clean == 'true'
# with:
# crate: cargo-cache
# version: 0.8.3
# strategies: quick-install

#- name: Clean the cargo cache
# if: inputs.cargo-cache-clean == 'true'
# uses: oxidize-rb/actions/post-run@v1
# with:
# run: cargo-cache --autoclean
# cwd: ${{ inputs.working-directory }}
# always: ${{ inputs.cache-save-always == 'true' }}

- name: Setup rb-sys
shell: bash
run: |
version="${{ steps.configure.outputs.rb_sys_version }}"
echo "Installing rb_sys@$version"

if [ "$version" = "latest" ]; then
gem install rb_sys
else
gem install rb_sys -v $version
fi

- run: |
echo "Switching to top-level workspace - we need to be able to resolve the root-level Cargo.toml"
cd ..
pwd

- name: Build gem
shell: bash
run: |
: Compile gem
echo "Docker Working Directory: $(pwd)"
set -x

rb-sys-dock \
--platform ${{ matrix.platform }} \
--mount-toolchains \
--directory language_client_ruby \
--ruby-versions 3.3,3.2,3.1,3.0,2.7 \
--build \
-- sudo yum install -y perl-IPC-Cmd

#################################################################################################################
#
# END: these steps are copied from https://github.com/oxidize-rb/actions/blob/main/cross-gem/action.yml
#
# We can't use oxidize-rb/actions/cross-gem@main directly, unfortunately, because our Ruby FFI lib is a member
# of the top-level workspace, and we need to do stuff to make rb-sys-dock play nice with it
#
#################################################################################################################

- run: |
for i in $(ls pkg/*.gem); do
gem push $i
done
Loading
Loading