Skip to content

Commit

Permalink
Merge branch 'main' into feat-smart-apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Sma1lboy committed Oct 15, 2024
2 parents a8d4ee6 + 5dfe7a1 commit ff177df
Show file tree
Hide file tree
Showing 41 changed files with 1,820 additions and 411 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release-intellij.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ jobs:
run: pnpm install

- name: Determine Publish Channel
env:
VERSION_STRING:
run: |
if [[ ${{ github.ref_name }} =~ intellij@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
if [[ ${{ github.ref_name }} =~ ^intellij@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "PUBLISH_CHANNEL=stable" >> $GITHUB_ENV
else
echo "PUBLISH_CHANNEL=alpha" >> $GITHUB_ENV
Expand Down Expand Up @@ -130,11 +128,23 @@ jobs:
arguments: signPlugin
build-root-directory: clients/intellij

- name: Determine is stable release
run: |
if [[ ${{ github.ref_name }} =~ ^intellij@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "STABLE_RELEASE=true" >> $GITHUB_ENV
else
echo "STABLE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Check if stable release
run: echo "Stable Release is ${{ env.STABLE_RELEASE }}"

- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
prerelease: true
prerelease: ${{ env.STABLE_RELEASE == 'false' }}
makeLatest: false
tag: ${{ github.ref_name }}
removeArtifacts: true
artifacts: "clients/intellij/build/distributions/intellij-tabby-signed.zip"
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,23 @@ jobs:
- name: Display structure of created files
run: ls -R dist

- name: Determine is stable release
run: |
if [[ ${{ github.ref_name }} =~ ^v@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "STABLE_RELEASE=true" >> $GITHUB_ENV
else
echo "STABLE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Check if stable release
run: echo "Stable Release is ${{ env.STABLE_RELEASE }}"

- uses: ncipollo/release-action@v1
if: github.event_name == 'push'
with:
allowUpdates: true
prerelease: true
allowUpdates: true
prerelease: ${{ env.STABLE_RELEASE == 'false' }}
makeLatest: ${{ env.STABLE_RELEASE == 'true' }}
artifacts: "dist/tabby_*.zip"
tag: ${{ github.ref_name }}
removeArtifacts: true
4 changes: 2 additions & 2 deletions clients/eclipse/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.tabbyml.features.tabby4eclipse"
label="Tabby"
version="0.0.2.21"
version="0.0.2.26"
provider-name="com.tabbyml">

<description url="http://www.example.com/description">
Expand All @@ -19,6 +19,6 @@

<plugin
id="com.tabbyml.tabby4eclipse"
version="0.0.2.21"/>
version="0.0.2.26"/>

</feature>
2 changes: 1 addition & 1 deletion clients/eclipse/plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tabby Plugin for Eclipse
Bundle-SymbolicName: com.tabbyml.tabby4eclipse;singleton:=true
Bundle-Version: 0.0.2.21
Bundle-Version: 0.0.2.26
Bundle-Activator: com.tabbyml.tabby4eclipse.Activator
Bundle-Vendor: com.tabbyml
Require-Bundle: org.eclipse.ui,
Expand Down
34 changes: 11 additions & 23 deletions clients/eclipse/plugin/chat-panel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
color: hsl(var(--primary));
}

#message div h4 {
margin: 16px 0;
#message div {
margin: 16px;
}

#message div p {
Expand Down Expand Up @@ -85,27 +85,6 @@ <h4>Welcome to Tabby Chat</h4>
chat.src = url;
}

getChatPanel().addEventListener('load', function () {
setTimeout(() => {
// handleChatPanelLoaded is a function injected by the client
handleChatPanelLoaded();

const chat = getChatPanel();
// override iframe style
const theme = document.documentElement.className;
const css = document.documentElement.style.cssText;
chat.contentWindow.postMessage({ style: css, themeClass: theme, }, new URL(chat.src).origin);
// alternatively:
// const chatDocument = chat.contentWindow.document;
// chatDocument.documentElement.className = theme;
// chatDocument.documentElement.style.cssText = css;
// chatDocument.body.style.cssText = css;

// handleChatPanelStyleApplied is a function injected by the client
setTimeout(handleChatPanelStyleApplied, 100);
}, 300);
});

function applyStyle(style) {
const { theme, css } = JSON.parse(style);
document.documentElement.className = theme;
Expand All @@ -132,6 +111,15 @@ <h4>Welcome to Tabby Chat</h4>
);
}

window.addEventListener("focus", (event) => {
const chat = getChatPanel();
if (chat.style.cssText == "display: block;") {
setTimeout(() => {
chat.contentWindow.focus();
}, 1);
}
});

window.addEventListener("message", (event) => {
const chat = getChatPanel();

Expand Down
Loading

0 comments on commit ff177df

Please sign in to comment.