diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 7e74cf045..594092dc4 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -40,12 +40,6 @@ jobs: fail-fast: false matrix: config: - - os: ubuntu-latest - arch: x86_64 - rust_target: x86_64-unknown-linux-gnu - - os: macos-latest - arch: aarch64 - rust_target: x86_64-apple-darwin,aarch64-apple-darwin - os: windows-latest arch: x86_64 rust_target: x86_64-pc-windows-msvc @@ -77,12 +71,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} - APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} - APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} - APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} with: releaseId: ${{ needs.create-release.outputs.release_id }} args: ${{ matrix.config.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 6691403e6..a92bf28c1 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -995,6 +995,8 @@ function _Chat() { const fontSize = config.fontSize; const fontFamily = config.fontFamily; + const slashOffsetRef = useRef(0); + const [showExport, setShowExport] = useState(false); const inputRef = useRef(null); @@ -1093,10 +1095,13 @@ function _Chat() { setPromptHints([]); } else if (text.match(ChatCommandPrefix)) { setPromptHints(chatCommands.search(text)); - } else if (!config.disablePromptHint && n < SEARCH_TEXT_LIMIT) { + } else if ( + !config.disablePromptHint && + text.length < slashOffsetRef.current + SEARCH_TEXT_LIMIT + ) { // check if need to trigger auto completion - if (text.startsWith("/")) { - let searchText = text.slice(1); + if (text.slice(slashOffsetRef.current).startsWith("/")) { + let searchText = text.slice(slashOffsetRef.current + 1); onSearch(searchText); } } @@ -1134,7 +1139,7 @@ function _Chat() { setUserInput(""); } else { // or fill the prompt - setUserInput(prompt.content); + setUserInput(prompt.content + userInput.slice(0, slashOffsetRef.current)); } inputRef.current?.focus(); }, 30); @@ -1185,6 +1190,8 @@ function _Chat() { setUserInput(chatStore.lastInput ?? ""); e.preventDefault(); return; + } else if (e.key === "/") { + slashOffsetRef.current = userInput.length; } if (shouldSubmit(e) && promptHints.length === 0) { doSubmit(userInput);