├── CODEOWNERS ├── proto ├── .gitignore ├── tsconfig.json ├── buf.gen.yaml └── buf.yaml ├── crates ├── figterm │ ├── .gitignore │ ├── src │ │ ├── input │ │ │ └── README.md │ │ ├── logger.rs │ │ └── cleanup.rs │ └── tests │ │ └── cli.rs ├── q_cli │ ├── tests │ │ ├── .ignore │ │ ├── cli_user.rs │ │ ├── cli_settings.rs │ │ └── common │ │ │ └── mod.rs │ ├── .gitignore │ └── src │ │ ├── cli │ │ └── doctor │ │ │ └── checks │ │ │ └── mod.rs │ │ └── util │ │ └── region_check.rs ├── alacritty_terminal │ ├── tests │ │ ├── .ignore │ │ └── ref │ │ │ ├── ll │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── csi_rep │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── fish_cc │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── sgr │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── alt_reset │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── decaln_reset │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── delete_lines │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── hyperlinks │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── issue_855 │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── row_reset │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── saved_cursor │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── tmux_git_log │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── tmux_htop │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── underline │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── zerowidth │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── clear_underline │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── colored_reset │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── colored_underline │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── deccolm_reset │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── erase_chars_reset │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── erase_in_line │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── grid_reset │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── history │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── saved_cursor_alt │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── scroll_up_reset │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── selective_erasure │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── tab_rendering │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vim_simple_edit │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vttest_insert │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vttest_scroll │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── delete_chars_reset │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── indexed_256_colors │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── insert_blank_reset │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── region_scroll_down │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vim_24bitcolors_bce │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vttest_origin_mode_1 │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vttest_origin_mode_2 │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vttest_tab_clear_set │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── wrapline_alt_toggle │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── zsh_tab_completion │ │ │ ├── config.json │ │ │ ├── size.json │ │ │ └── alacritty.recording │ │ │ ├── vim_large_window_scroll │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── vttest_cursor_movement_1 │ │ │ ├── config.json │ │ │ └── size.json │ │ │ ├── newline_with_cursor_beyond_scroll_region │ │ │ ├── config.json │ │ │ └── size.json │ │ │ └── scroll_in_region_up_preserves_history │ │ │ ├── config.json │ │ │ └── size.json │ └── src │ │ └── lib.rs ├── fig_input_method │ ├── .gitignore │ ├── resources │ │ ├── typo.tiff │ │ └── product_icon.icns │ └── src │ │ └── main.rs ├── fig_install │ ├── .gitignore │ └── src │ │ └── freebsd.rs ├── fig_integrations │ └── src │ │ ├── shell │ │ ├── inline_shell_completion │ │ │ ├── guard_end.zsh │ │ │ ├── guard_start.zsh │ │ │ ├── util.zsh │ │ │ └── strategies │ │ │ │ └── inline.zsh │ │ ├── scripts │ │ │ └── update-bash-preexec.sh │ │ └── snapshots │ │ │ ├── fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap │ │ │ ├── fig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap │ │ │ ├── fig_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap │ │ │ ├── fig_integrations__shell__test__zsh_post_zprofile.post.zsh.snap │ │ │ ├── fig_integrations__shell__test__bash_pre_bashrc.pre.bash.snap │ │ │ ├── fig_integrations__shell__test__bash_post_bashrc.post.bash.snap │ │ │ ├── fig_integrations__shell__test__bash_post_profile.post.bash.snap │ │ │ ├── fig_integrations__shell__test__bash_pre_profile.pre.bash.snap │ │ │ ├── fig_integrations__shell__test__bash_pre_bash_login.pre.bash.snap │ │ │ ├── fig_integrations__shell__test__bash_post_bash_login.post.bash.snap │ │ │ ├── fig_integrations__shell__test__bash_post_bash_profile.post.bash.snap │ │ │ └── fig_integrations__shell__test__bash_pre_bash_profile.pre.bash.snap │ │ ├── vscode │ │ └── vscode-plugin.vsix │ │ └── intellij │ │ ├── mod.rs │ │ └── instrumented-codewhisperer-for-command-line-companion-1.0.4.jar ├── macos-utils │ ├── accessibility-master │ │ ├── .gitignore │ │ ├── aq │ │ │ └── Cargo.toml │ │ └── accessibility-sys │ │ │ └── src │ │ │ ├── value_constants.rs │ │ │ └── lib.rs │ ├── appkit-nsworkspace-bindings │ │ ├── build.rs │ │ ├── src │ │ │ └── lib.rs │ │ └── Cargo.toml │ └── src │ │ ├── url.rs │ │ └── lib.rs ├── fig_desktop │ ├── fuzz │ │ ├── .gitignore │ │ └── Cargo.toml │ ├── .gitignore │ ├── src │ │ ├── protocol │ │ │ └── mod.rs │ │ ├── webview │ │ │ └── companion.rs │ │ └── auth_watcher.rs │ ├── icons │ │ ├── 32x32.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ ├── icon.png │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── VolumeIcon.png │ │ ├── icon-monochrome.png │ │ ├── not-logged-in.png │ │ ├── yellow-circle.png │ │ ├── autocomplete │ │ │ ├── box.png │ │ │ ├── cpu.png │ │ │ ├── file.png │ │ │ ├── flag.png │ │ │ ├── gear.png │ │ │ ├── alert.png │ │ │ ├── carrot.png │ │ │ ├── command.png │ │ │ ├── folder.png │ │ │ ├── invite.png │ │ │ ├── option.png │ │ │ ├── package.png │ │ │ ├── string.png │ │ │ ├── symlink.png │ │ │ ├── asterisk.png │ │ │ ├── database.png │ │ │ ├── template.png │ │ │ ├── characters.png │ │ │ └── commandkey.png │ │ ├── not-logged-in-light.png │ │ └── icon-monochrome-light.png │ └── entitlements.plist ├── fig_api_client │ └── src │ │ ├── interceptor │ │ └── mod.rs │ │ ├── clients │ │ └── mod.rs │ │ └── lib.rs ├── fig_ipc │ ├── src │ │ └── codec │ │ │ └── mod.rs │ └── test │ │ └── data │ │ └── alias.txt ├── fig_test_utils │ ├── src │ │ └── lib.rs │ └── README.md ├── fig_settings │ └── src │ │ ├── keys.rs │ │ └── sqlite │ │ └── migrations │ │ ├── 004_state_table.sql │ │ ├── 002_drop_history_in_ssh_docker.sql │ │ ├── 000_migration_table.sql │ │ ├── 003_improved_history_timing.sql │ │ ├── 005_auth_table.sql │ │ └── 001_history_table.sql ├── semantic_search_client │ └── src │ │ ├── index │ │ └── mod.rs │ │ └── processing │ │ └── mod.rs ├── amzn-consolas-client │ └── src │ │ ├── primitives │ │ └── event_stream.rs │ │ ├── config │ │ ├── timeout.rs │ │ ├── http.rs │ │ └── retry.rs │ │ ├── meta.rs │ │ ├── primitives.rs │ │ └── protocol_serde │ │ ├── shape_programming_language.rs │ │ ├── shape_delete_profile_input.rs │ │ ├── shape_get_customization_input.rs │ │ ├── shape_list_tags_for_resource_input.rs │ │ ├── shape_external_identity_source.rs │ │ ├── shape_sso_identity_source.rs │ │ └── shape_delete_customization_permissions_input.rs ├── amzn-codewhisperer-client │ └── src │ │ ├── primitives │ │ └── event_stream.rs │ │ ├── config │ │ ├── timeout.rs │ │ ├── http.rs │ │ └── retry.rs │ │ ├── meta.rs │ │ ├── primitives.rs │ │ └── protocol_serde │ │ ├── shape_cache_point.rs │ │ ├── shape_code_description.rs │ │ ├── shape_git_state.rs │ │ ├── shape_change_log_options.rs │ │ ├── shape_feature_dev_event.rs │ │ ├── shape_tool_input_schema.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_code_fix_upload_context.rs │ │ ├── shape_code_analysis_upload_context.rs │ │ ├── shape_code_diff_metadata.rs │ │ ├── shape_client_cache_config.rs │ │ ├── shape_get_profile_input.rs │ │ ├── shape_user_settings.rs │ │ ├── shape_task_assist_planning_upload_context.rs │ │ ├── shape_dimension.rs │ │ ├── shape_followup_prompt.rs │ │ ├── shape_create_task_assist_conversation_input.rs │ │ ├── shape_tool_use.rs │ │ └── shape_environment_variable.rs ├── amzn-toolkit-telemetry-client │ └── src │ │ ├── primitives │ │ └── event_stream.rs │ │ ├── config │ │ ├── timeout.rs │ │ └── retry.rs │ │ ├── primitives.rs │ │ ├── types │ │ └── builders.rs │ │ ├── meta.rs │ │ ├── operation.rs │ │ └── protocol_serde │ │ ├── shape_userdata.rs │ │ └── shape_metadata_entry.rs ├── amzn-codewhisperer-streaming-client │ └── src │ │ ├── primitives │ │ └── event_stream.rs │ │ ├── config │ │ ├── timeout.rs │ │ ├── http.rs │ │ └── retry.rs │ │ ├── meta.rs │ │ ├── primitives.rs │ │ ├── protocol_serde │ │ ├── shape_cache_point.rs │ │ ├── shape_code_description.rs │ │ ├── shape_git_state.rs │ │ ├── shape_tool_input_schema.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_client_cache_config.rs │ │ └── shape_user_settings.rs │ │ └── operation.rs ├── amzn-qdeveloper-streaming-client │ └── src │ │ ├── primitives │ │ └── event_stream.rs │ │ ├── config │ │ ├── timeout.rs │ │ ├── http.rs │ │ └── retry.rs │ │ ├── operation.rs │ │ ├── meta.rs │ │ ├── primitives.rs │ │ └── protocol_serde │ │ ├── shape_cache_point.rs │ │ ├── shape_code_description.rs │ │ ├── shape_git_state.rs │ │ ├── shape_tool_input_schema.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_client_cache_config.rs │ │ └── shape_user_settings.rs ├── aws-toolkit-telemetry-definitions │ ├── README.md │ └── Cargo.toml ├── fig_desktop_api │ └── src │ │ ├── lib.rs │ │ ├── notify.rs │ │ └── error.rs ├── dbus │ └── src │ │ └── lib.rs ├── fig_telemetry_core │ └── README.md ├── fig_test_macro │ └── Cargo.toml ├── fig_util │ └── src │ │ └── process_info │ │ └── freebsd.rs ├── fig_proto │ └── src │ │ └── util.rs ├── fig_auth │ └── src │ │ └── lib.rs ├── fig_request │ └── src │ │ └── lib.rs ├── zbus │ └── src │ │ └── abstractions │ │ ├── mod.rs │ │ └── process.rs └── fig_aws_common │ └── Cargo.toml ├── packages ├── shell-parser │ ├── .gitignore │ ├── README.md │ ├── src │ │ ├── index.ts │ │ └── errors.ts │ ├── tsconfig.eslint.json │ ├── vitest.config.ts │ ├── eslint.config.js │ ├── tsconfig.json │ └── tests │ │ └── fixtures │ │ ├── basic │ │ └── input.sh │ │ ├── primaryExpressions │ │ └── input.sh │ │ └── multipleStatements │ │ └── input.sh ├── eslint-config │ ├── .gitignore │ ├── tsconfig.json │ ├── README.md │ └── src │ │ └── base.config.ts ├── autocomplete-parser │ ├── .gitignore │ ├── README.md │ ├── tsconfig.eslint.json │ ├── eslint.config.js │ ├── vitest.config.ts │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── api-bindings-wrappers │ ├── .gitignore │ ├── README.md │ ├── eslint.config.js │ ├── src │ │ ├── index.ts │ │ └── fs.ts │ └── tsconfig.json ├── shared │ ├── .gitignore │ ├── tsconfig.eslint.json │ ├── vitest.config.ts │ ├── eslint.config.js │ ├── src │ │ ├── index.ts │ │ └── errors.ts │ ├── tsconfig.json │ └── README.md ├── autocomplete │ ├── .gitignore │ ├── src │ │ ├── vite-env.d.ts │ │ ├── consts.ts │ │ ├── assets │ │ │ ├── flag.png │ │ │ ├── carrot.png │ │ │ ├── command.png │ │ │ ├── option.png │ │ │ ├── string.png │ │ │ └── asterisk.png │ │ ├── fig │ │ │ └── errors.ts │ │ ├── state │ │ │ └── errors.ts │ │ ├── history │ │ │ └── errors.ts │ │ └── telemetry.ts │ ├── dev.sh │ ├── postcss.config.js │ ├── eslint.config.js │ ├── vitest.config.ts │ ├── tsconfig.node.json │ └── index.html ├── autocomplete-app │ ├── .gitignore │ ├── src │ │ ├── vite-env.d.ts │ │ ├── consts.ts │ │ ├── assets │ │ │ ├── flag.png │ │ │ ├── asterisk.png │ │ │ ├── carrot.png │ │ │ ├── command.png │ │ │ ├── option.png │ │ │ └── string.png │ │ ├── fig │ │ │ └── errors.ts │ │ ├── state │ │ │ └── errors.ts │ │ ├── history │ │ │ └── errors.ts │ │ └── telemetry.ts │ ├── dev.sh │ ├── postcss.config.js │ ├── eslint.config.js │ ├── vitest.config.ts │ ├── tsconfig.node.json │ └── index.html ├── dashboard-app │ ├── .ignore │ ├── src │ │ ├── vite-env.d.ts │ │ ├── hooks │ │ │ ├── store │ │ │ │ ├── index.ts │ │ │ │ ├── usePlatformInfo.ts │ │ │ │ └── useStoreContext.ts │ │ │ └── useCountdown.tsx │ │ ├── context │ │ │ ├── zustand.ts │ │ │ └── input.ts │ │ ├── pages │ │ │ ├── settings │ │ │ │ └── keybindings.tsx │ │ │ └── terminal │ │ │ │ └── translate.tsx │ │ ├── components │ │ │ ├── ui │ │ │ │ ├── collapsible.tsx │ │ │ │ └── skeleton.tsx │ │ │ ├── modal.tsx │ │ │ └── text │ │ │ │ └── code.tsx │ │ ├── main.tsx │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── sort.ts │ │ └── data │ │ │ └── help.ts │ ├── postcss.config.js │ ├── assets │ │ ├── images │ │ │ ├── chat_demo.gif │ │ │ ├── desktop_entry.png │ │ │ ├── inline_demo.gif │ │ │ ├── translate_demo.gif │ │ │ ├── accessibility_fig.png │ │ │ ├── autocomplete_demo.gif │ │ │ ├── fig-migration │ │ │ │ ├── dark.png │ │ │ │ └── light.png │ │ │ └── gnome_shell_extension.png │ │ └── fonts │ │ │ └── Ember │ │ │ ├── AmazonEmber_Bd.ttf │ │ │ ├── AmazonEmber_He.ttf │ │ │ ├── AmazonEmber_Lt.ttf │ │ │ ├── AmazonEmber_Md.ttf │ │ │ ├── AmazonEmber_Rg.ttf │ │ │ └── AmazonEmber_Th.ttf │ ├── public │ │ └── images │ │ │ └── integrations │ │ │ ├── icons │ │ │ ├── hyper.png │ │ │ ├── iterm.png │ │ │ ├── vscode.png │ │ │ └── terminal.png │ │ │ └── bg │ │ │ ├── terminal.svg │ │ │ ├── hyper.svg │ │ │ ├── iterm.svg │ │ │ └── vscode.svg │ ├── tsconfig.node.json │ ├── .gitignore │ ├── components.json │ ├── index.html │ └── README.md ├── api-bindings │ ├── .gitignore │ ├── eslint.config.js │ ├── src │ │ ├── user.ts │ │ ├── native.ts │ │ ├── codewhisperer.ts │ │ ├── platform.ts │ │ ├── profile.ts │ │ └── global.d.ts │ └── tsconfig.json ├── fuzzysort │ ├── README.md │ └── package.json ├── tsconfig │ ├── dom.json │ ├── package.json │ └── base.json └── types │ └── package.json ├── tests ├── figterm │ ├── configs │ │ ├── aliases │ │ │ ├── zshrc │ │ │ └── bashrc │ │ ├── emulate │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ ├── starship │ │ │ ├── zshrc │ │ │ ├── bashrc │ │ │ └── Dockerfile │ │ ├── prezto │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ ├── spaces_in_path │ │ │ ├── zshrc │ │ │ └── bashrc │ │ ├── pure │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ ├── startup │ │ │ ├── bashrc │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ ├── zsh-history-substring-search │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ ├── blank │ │ │ └── Dockerfile │ │ ├── oh-my-zsh │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ ├── oh-my-zsh-autosuggestions │ │ │ ├── zshrc │ │ │ └── Dockerfile │ │ └── powerlevel10k │ │ │ ├── Dockerfile │ │ │ └── zshrc │ ├── .gitignore │ ├── tests │ │ ├── bash.test.ts │ │ ├── fish.test.ts │ │ └── zsh.test.ts │ ├── base.yaml │ ├── jest.config.js │ ├── jest-reporter.js │ ├── index.ts │ └── src │ │ └── settings.ts ├── figterm2 │ ├── src │ │ └── lib.rs │ └── Cargo.toml └── fig-api │ ├── src │ └── util.ts │ ├── vitest.config.ts │ ├── tsconfig.json │ ├── fig-api-mock │ └── Cargo.toml │ └── package.json ├── .mise.toml ├── vitest.workspace.ts ├── extensions ├── gnome-extension │ ├── schemas │ │ ├── .gitignore │ │ └── org.gnome.shell.extensions.amazon-q-for-cli-gnome-integration.gschema.xml │ ├── resources │ │ ├── .gitignore │ │ ├── ui │ │ │ └── adw │ │ │ │ └── Preferences.ui │ │ ├── amazon-q-for-cli-gnome-integration.gresource │ │ ├── icons │ │ │ └── scalable │ │ │ │ └── actions │ │ │ │ ├── fig-connected-symbolic.svg │ │ │ │ └── fig-disconnected-symbolic.svg │ │ └── resources.gresource.xml │ ├── .gitignore │ ├── ambient.d.ts │ ├── types │ │ ├── index.d.ts │ │ ├── gi.d.ts │ │ └── imports.d.ts │ ├── README.md │ ├── tsconfig.json │ ├── eslint.config.js │ └── src │ │ └── metadata.json ├── vscode │ ├── .gitignore │ ├── images │ │ └── icon.png │ ├── .vscodeignore │ ├── jsconfig.json │ ├── eslint.config.mjs │ ├── ignoretest │ │ └── suite │ │ │ └── extension.test.js │ └── README.md ├── gnome-legacy-extension │ ├── resources │ │ ├── .gitignore │ │ ├── ui │ │ │ └── adw │ │ │ │ └── Preferences.ui │ │ ├── amazon-q-for-cli-legacy-gnome-integration.gresource │ │ └── icons │ │ │ └── scalable │ │ │ └── actions │ │ │ ├── fig-connected-symbolic.svg │ │ │ └── fig-disconnected-symbolic.svg │ ├── schemas │ │ ├── .gitignore │ │ └── org.gnome.shell.extensions.amazon-q-for-cli-legacy-gnome-integration.gschema.xml │ ├── .gitignore │ ├── types │ │ ├── index.d.ts │ │ ├── gi.d.ts │ │ └── imports.d.ts │ ├── jsconfig.json │ ├── eslint.config.js │ ├── README.md │ └── src │ │ └── metadata.json └── jetbrains │ ├── .gitignore │ ├── gradle-panel.png │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── src │ └── main │ └── java │ └── io │ └── fig │ └── jetbrains │ ├── entries │ └── ITerminalEntry.java │ ├── instruments │ ├── TerminalInstrumentationType.java │ └── ITerminalInstrumentation.java │ └── terminal │ └── TerminalStatus.java ├── .husky └── pre-commit ├── .prettierrc ├── bundle ├── deb │ ├── postrm │ ├── prerm │ ├── control_minimal │ └── control ├── dmg │ ├── VolumeIcon.icns │ ├── background.png │ └── background@2x.png └── linux │ ├── desktop │ └── usr │ │ ├── lib │ │ ├── environment.d │ │ │ └── 60-fig.conf │ │ └── systemd │ │ │ └── user │ │ │ └── fig.service │ │ └── share │ │ └── applications │ │ └── fig.desktop │ └── README ├── .typos.toml ├── .github ├── media │ ├── amazon-q-logo.avif │ └── amazon-q-cli-features.jpeg └── workflows │ └── typos.yml ├── models └── all-MiniLM-L6-v2.zip ├── pnpm-workspace.yaml ├── .gitattributes ├── .cargo └── config.toml ├── vitest.config.ts ├── rust-toolchain.toml ├── CODE_OF_CONDUCT.md ├── Cross.toml ├── .lintstagedrc.mjs ├── SECURITY.md └── turbo.json /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @aws/fig 2 | -------------------------------------------------------------------------------- /proto/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /crates/figterm/.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /crates/q_cli/tests/.ignore: -------------------------------------------------------------------------------- 1 | /snapshots -------------------------------------------------------------------------------- /packages/shell-parser/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/.ignore: -------------------------------------------------------------------------------- 1 | ref -------------------------------------------------------------------------------- /crates/q_cli/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | spec.ts -------------------------------------------------------------------------------- /packages/eslint-config/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | -------------------------------------------------------------------------------- /crates/fig_input_method/.gitignore: -------------------------------------------------------------------------------- 1 | *.plist 2 | -------------------------------------------------------------------------------- /packages/autocomplete-parser/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ -------------------------------------------------------------------------------- /crates/fig_install/.gitignore: -------------------------------------------------------------------------------- 1 | index.json 2 | *.sh 3 | -------------------------------------------------------------------------------- /packages/api-bindings-wrappers/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | -------------------------------------------------------------------------------- /packages/shared/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | *.tsbuildinfo -------------------------------------------------------------------------------- /packages/shell-parser/README.md: -------------------------------------------------------------------------------- 1 | # shell-parser 2 | -------------------------------------------------------------------------------- /tests/figterm/configs/aliases/zshrc: -------------------------------------------------------------------------------- 1 | alias g="git" 2 | -------------------------------------------------------------------------------- /.mise.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | node = "22" 3 | python = "3.11" 4 | -------------------------------------------------------------------------------- /packages/autocomplete-parser/README.md: -------------------------------------------------------------------------------- 1 | # shell-parser 2 | -------------------------------------------------------------------------------- /packages/autocomplete/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | dist-ssr 3 | .env -------------------------------------------------------------------------------- /tests/figterm/.gitignore: -------------------------------------------------------------------------------- 1 | docker-compose.yaml 2 | !bin 3 | -------------------------------------------------------------------------------- /tests/figterm/configs/aliases/bashrc: -------------------------------------------------------------------------------- 1 | alias g="git" 2 | -------------------------------------------------------------------------------- /vitest.workspace.ts: -------------------------------------------------------------------------------- 1 | export default ["packages/*"]; 2 | -------------------------------------------------------------------------------- /extensions/gnome-extension/schemas/.gitignore: -------------------------------------------------------------------------------- 1 | gschemas.compiled -------------------------------------------------------------------------------- /packages/api-bindings-wrappers/README.md: -------------------------------------------------------------------------------- 1 | # shell-parser 2 | -------------------------------------------------------------------------------- /packages/autocomplete-app/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | dist-ssr 3 | .env -------------------------------------------------------------------------------- /packages/dashboard-app/.ignore: -------------------------------------------------------------------------------- 1 | public/license/NOTICE.txt 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | pnpm run precommit 2 | pnpm run -r precommit 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false 4 | } 5 | -------------------------------------------------------------------------------- /bundle/deb/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | killall q-desktop || true 4 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/ll/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /extensions/gnome-extension/resources/.gitignore: -------------------------------------------------------------------------------- 1 | resources.gresource -------------------------------------------------------------------------------- /extensions/vscode/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix 3 | .vscode-test -------------------------------------------------------------------------------- /tests/figterm/configs/emulate/zshrc: -------------------------------------------------------------------------------- 1 | emulate sh -c '. ./.bashrc' 2 | -------------------------------------------------------------------------------- /tests/figterm/configs/starship/zshrc: -------------------------------------------------------------------------------- 1 | eval "$(starship init zsh)" 2 | -------------------------------------------------------------------------------- /tests/figterm2/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod shell; 2 | pub use shell::Shell; 3 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/csi_rep/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/fish_cc/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/sgr/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/resources/.gitignore: -------------------------------------------------------------------------------- 1 | resources.gresource -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/schemas/.gitignore: -------------------------------------------------------------------------------- 1 | gschemas.compiled -------------------------------------------------------------------------------- /tests/figterm/configs/prezto/zshrc: -------------------------------------------------------------------------------- 1 | source "$HOME/.zprezto/init.zsh" 2 | -------------------------------------------------------------------------------- /tests/figterm/configs/starship/bashrc: -------------------------------------------------------------------------------- 1 | eval "$(starship init bash)" 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/alt_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/decaln_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/delete_lines/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/hyperlinks/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/issue_855/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/row_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":1200} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/saved_cursor/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/tmux_git_log/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/tmux_htop/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/underline/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/zerowidth/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/inline_shell_completion/guard_end.zsh: -------------------------------------------------------------------------------- 1 | fi 2 | -------------------------------------------------------------------------------- /crates/macos-utils/accessibility-master/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/clear_underline/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/colored_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/colored_underline/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/deccolm_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/erase_chars_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/erase_in_line/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/grid_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":100} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/history/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":1000} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/saved_cursor_alt/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/scroll_up_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/selective_erasure/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/tab_rendering/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vim_simple_edit/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_insert/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_scroll/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/fig_desktop/fuzz/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | corpus 3 | artifacts 4 | coverage 5 | -------------------------------------------------------------------------------- /packages/api-bindings/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | node_modules 4 | dist 5 | -------------------------------------------------------------------------------- /packages/autocomplete/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/delete_chars_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/indexed_256_colors/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/insert_blank_reset/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/ll/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/region_scroll_down/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":10} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/sgr/size.json: -------------------------------------------------------------------------------- 1 | {"columns":139,"screen_lines":35} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vim_24bitcolors_bce/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_origin_mode_1/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_origin_mode_2/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_tab_clear_set/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/wrapline_alt_toggle/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/zsh_tab_completion/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /packages/autocomplete-app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /tests/figterm/configs/spaces_in_path/zshrc: -------------------------------------------------------------------------------- 1 | export PATH="/usr/local/Fake\ Path:$PATH" 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/alt_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":106,"screen_lines":30} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/csi_rep/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/erase_in_line/size.json: -------------------------------------------------------------------------------- 1 | {"columns":139,"screen_lines":33} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/fish_cc/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/history/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/hyperlinks/size.json: -------------------------------------------------------------------------------- 1 | {"columns":140,"screen_lines":32} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/issue_855/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/row_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":172,"screen_lines":47} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/tmux_htop/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/underline/size.json: -------------------------------------------------------------------------------- 1 | {"screen_lines":64,"columns":134} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vim_large_window_scroll/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_cursor_movement_1/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/zerowidth/size.json: -------------------------------------------------------------------------------- 1 | {"screen_lines":35,"columns":139} 2 | -------------------------------------------------------------------------------- /crates/fig_api_client/src/interceptor/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod opt_out; 2 | pub mod session_id; 3 | -------------------------------------------------------------------------------- /tests/figterm/configs/spaces_in_path/bashrc: -------------------------------------------------------------------------------- 1 | export PATH="/usr/local/Fake\ Path:$PATH" 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/clear_underline/size.json: -------------------------------------------------------------------------------- 1 | {"columns":66,"screen_lines":32} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/colored_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":116,"screen_lines":63} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/colored_underline/size.json: -------------------------------------------------------------------------------- 1 | {"columns":157,"screen_lines":40} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/decaln_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":106,"screen_lines":30} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/deccolm_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":106,"screen_lines":30} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/delete_lines/size.json: -------------------------------------------------------------------------------- 1 | {"columns":116,"screen_lines":31} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/grid_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/saved_cursor/size.json: -------------------------------------------------------------------------------- 1 | {"columns":139,"screen_lines":35} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/tab_rendering/size.json: -------------------------------------------------------------------------------- 1 | {"columns":116,"screen_lines":63} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/tmux_git_log/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vim_simple_edit/size.json: -------------------------------------------------------------------------------- 1 | {"columns":80,"screen_lines":24} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_insert/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_scroll/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/fig_ipc/src/codec/mod.rs: -------------------------------------------------------------------------------- 1 | mod base64line; 2 | 3 | pub use base64line::Base64LineCodec; 4 | -------------------------------------------------------------------------------- /crates/fig_test_utils/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod server; 2 | 3 | pub use http; 4 | pub use server::*; 5 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/delete_chars_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":106,"screen_lines":30} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/erase_chars_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":106,"screen_lines":30} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/indexed_256_colors/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/insert_blank_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":106,"screen_lines":30} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/region_scroll_down/size.json: -------------------------------------------------------------------------------- 1 | {"columns":116,"screen_lines":31} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/saved_cursor_alt/size.json: -------------------------------------------------------------------------------- 1 | {"columns":139,"screen_lines":35} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/scroll_up_reset/size.json: -------------------------------------------------------------------------------- 1 | {"columns":102,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/selective_erasure/size.json: -------------------------------------------------------------------------------- 1 | {"columns":10,"screen_lines":3} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vim_24bitcolors_bce/size.json: -------------------------------------------------------------------------------- 1 | {"columns":174,"screen_lines":96} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/wrapline_alt_toggle/size.json: -------------------------------------------------------------------------------- 1 | {"columns":139,"screen_lines":35} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/zsh_tab_completion/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /packages/shell-parser/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./parser.js"; 2 | export * from "./command.js"; 3 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/newline_with_cursor_beyond_scroll_region/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":0} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/scroll_in_region_up_preserves_history/config.json: -------------------------------------------------------------------------------- 1 | {"history_size":10} -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vim_large_window_scroll/size.json: -------------------------------------------------------------------------------- 1 | {"columns":172,"screen_lines":47} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_cursor_movement_1/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_origin_mode_1/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_origin_mode_2/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/vttest_tab_clear_set/size.json: -------------------------------------------------------------------------------- 1 | {"columns":116,"screen_lines":31} 2 | -------------------------------------------------------------------------------- /crates/fig_settings/src/keys.rs: -------------------------------------------------------------------------------- 1 | pub const UPDATE_AVAILABLE_KEY: &str = "update.new-version-available"; 2 | -------------------------------------------------------------------------------- /packages/fuzzysort/README.md: -------------------------------------------------------------------------------- 1 | # fuzzysort 2 | 3 | This is a fork of https://github.com/farzher/fuzzysort 4 | -------------------------------------------------------------------------------- /crates/semantic_search_client/src/index/mod.rs: -------------------------------------------------------------------------------- 1 | mod vector_index; 2 | 3 | pub use vector_index::VectorIndex; 4 | -------------------------------------------------------------------------------- /extensions/jetbrains/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | build.gradle/ 3 | .gradle/ 4 | .idea/ 5 | bin/ 6 | 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /packages/autocomplete/src/consts.ts: -------------------------------------------------------------------------------- 1 | export const PRODUCT_NAME = "Amazon Q"; 2 | export const CLI_NAME = "q"; 3 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/scroll_in_region_up_preserves_history/size.json: -------------------------------------------------------------------------------- 1 | {"columns":80,"screen_lines":30} -------------------------------------------------------------------------------- /crates/fig_desktop/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | -------------------------------------------------------------------------------- /packages/autocomplete-app/src/consts.ts: -------------------------------------------------------------------------------- 1 | export const PRODUCT_NAME = "Amazon Q"; 2 | export const CLI_NAME = "q"; 3 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src", "tests"] 4 | } 5 | -------------------------------------------------------------------------------- /tests/figterm/configs/pure/zshrc: -------------------------------------------------------------------------------- 1 | fpath+=$HOME/.zsh/pure 2 | autoload -U promptinit; promptinit 3 | prompt pure 4 | -------------------------------------------------------------------------------- /.typos.toml: -------------------------------------------------------------------------------- 1 | [files] 2 | 3 | [default.extend-words] 4 | mmaped = "mmaped" 5 | caf = "caf" # used in chat tools test 6 | -------------------------------------------------------------------------------- /bundle/deb/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "remove" ]; then 4 | q _ uninstall-for-all-users || true 5 | fi 6 | -------------------------------------------------------------------------------- /crates/fig_test_utils/README.md: -------------------------------------------------------------------------------- 1 | # fig_test_utils 2 | 3 | Common utilities for writing unit and integration tests. 4 | 5 | -------------------------------------------------------------------------------- /bundle/dmg/VolumeIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/bundle/dmg/VolumeIcon.icns -------------------------------------------------------------------------------- /bundle/dmg/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/bundle/dmg/background.png -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/newline_with_cursor_beyond_scroll_region/size.json: -------------------------------------------------------------------------------- 1 | {"columns":105,"screen_lines":29} 2 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/selective_erasure/alacritty.recording: -------------------------------------------------------------------------------- 1 | A[1"qB[2"qC[?2J 2 | A[1"qB[2"qC[?2K 3 | -------------------------------------------------------------------------------- /crates/fig_desktop/src/protocol/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod api; 2 | pub mod icons; 3 | pub mod resource; 4 | pub mod spec; 5 | mod util; 6 | -------------------------------------------------------------------------------- /packages/shared/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({}); 4 | -------------------------------------------------------------------------------- /packages/shell-parser/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src", "tests"] 4 | } 5 | -------------------------------------------------------------------------------- /tests/figterm/tests/bash.test.ts: -------------------------------------------------------------------------------- 1 | import { makeTestsForShell } from './utils'; 2 | 3 | makeTestsForShell({ shell: 'bash' }); 4 | -------------------------------------------------------------------------------- /tests/figterm/tests/fish.test.ts: -------------------------------------------------------------------------------- 1 | import { makeTestsForShell } from './utils'; 2 | 3 | makeTestsForShell({ shell: 'fish' }); 4 | -------------------------------------------------------------------------------- /tests/figterm/tests/zsh.test.ts: -------------------------------------------------------------------------------- 1 | import { makeTestsForShell } from './utils'; 2 | 3 | makeTestsForShell({ shell: 'zsh' }); 4 | -------------------------------------------------------------------------------- /bundle/dmg/background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/bundle/dmg/background@2x.png -------------------------------------------------------------------------------- /packages/autocomplete-parser/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src", "tests"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/shell-parser/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({}); 4 | -------------------------------------------------------------------------------- /proto/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@amzn/tsconfig/base.json", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tests/figterm/configs/startup/bashrc: -------------------------------------------------------------------------------- 1 | export PATH="$HOME/.local/bin:$PATH" 2 | TTY=$(tty) 3 | PROMPT_COMMAND="q hook prompt $$ $TTY" 4 | -------------------------------------------------------------------------------- /.github/media/amazon-q-logo.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/.github/media/amazon-q-logo.avif -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/fig_desktop/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/32x32.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/icon.icns -------------------------------------------------------------------------------- /crates/fig_desktop/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/icon.ico -------------------------------------------------------------------------------- /crates/fig_desktop/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/icon.png -------------------------------------------------------------------------------- /crates/fig_settings/src/sqlite/migrations/004_state_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE state ( 2 | key TEXT PRIMARY KEY, 3 | value TEXT 4 | ); 5 | -------------------------------------------------------------------------------- /extensions/vscode/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/extensions/vscode/images/icon.png -------------------------------------------------------------------------------- /packages/autocomplete-app/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | trap 'yarn remove-host' SIGINT; { sleep 0.5 && yarn set-host; } & vite --port 3124 -------------------------------------------------------------------------------- /packages/autocomplete/dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | trap 'yarn remove-host' SIGINT; { sleep 0.5 && yarn set-host; } & vite --port 3124 -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/fig_desktop/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/128x128.png -------------------------------------------------------------------------------- /packages/autocomplete-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/autocomplete/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/dashboard-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/fig_desktop/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/128x128@2x.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/VolumeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/VolumeIcon.png -------------------------------------------------------------------------------- /crates/fig_desktop/src/webview/companion.rs: -------------------------------------------------------------------------------- 1 | use url::Url; 2 | 3 | pub fn _url() -> Url { 4 | Url::parse("http://localhost:3434").unwrap() 5 | } 6 | -------------------------------------------------------------------------------- /extensions/gnome-extension/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /types/.*.d.ts 3 | /amazon-q-for-cli-gnome-integration@aws.amazon.com.zip 4 | /.vscode 5 | /dist -------------------------------------------------------------------------------- /extensions/jetbrains/gradle-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/extensions/jetbrains/gradle-panel.png -------------------------------------------------------------------------------- /.github/media/amazon-q-cli-features.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/.github/media/amazon-q-cli-features.jpeg -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /packages/autocomplete/src/assets/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete/src/assets/flag.png -------------------------------------------------------------------------------- /packages/dashboard-app/src/hooks/store/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./useStoreContext"; 2 | export * from "./useSetting"; 3 | export * from "./useStatusCheck"; 4 | -------------------------------------------------------------------------------- /crates/fig_desktop/icons/icon-monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/icon-monochrome.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/not-logged-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/not-logged-in.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/yellow-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/yellow-circle.png -------------------------------------------------------------------------------- /crates/fig_input_method/resources/typo.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_input_method/resources/typo.tiff -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /types/.*.d.ts 3 | /amazon-q-for-cli-legacy-gnome-integration@aws.amazon.com.zip 4 | /.vscode 5 | -------------------------------------------------------------------------------- /packages/autocomplete/src/assets/carrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete/src/assets/carrot.png -------------------------------------------------------------------------------- /packages/autocomplete/src/assets/command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete/src/assets/command.png -------------------------------------------------------------------------------- /packages/autocomplete/src/assets/option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete/src/assets/option.png -------------------------------------------------------------------------------- /packages/autocomplete/src/assets/string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete/src/assets/string.png -------------------------------------------------------------------------------- /tests/figterm/configs/zsh-history-substring-search/zshrc: -------------------------------------------------------------------------------- 1 | export ZSH="$HOME/.oh-my-zsh" 2 | plugins=(zsh-history-substring-search) 3 | source $ZSH/oh-my-zsh.sh 4 | -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/box.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/cpu.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/file.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/flag.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/gear.png -------------------------------------------------------------------------------- /crates/fig_settings/src/sqlite/migrations/002_drop_history_in_ssh_docker.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE history DROP COLUMN in_ssh; 2 | ALTER TABLE history DROP COLUMN in_docker; 3 | -------------------------------------------------------------------------------- /packages/autocomplete-app/src/assets/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete-app/src/assets/flag.png -------------------------------------------------------------------------------- /packages/autocomplete/src/assets/asterisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete/src/assets/asterisk.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/alert.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/carrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/carrot.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/command.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/folder.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/invite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/invite.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/option.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/package.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/string.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/symlink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/symlink.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/not-logged-in-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/not-logged-in-light.png -------------------------------------------------------------------------------- /models/all-MiniLM-L6-v2.zip: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1df18f494ec0a30d1ef4bc7ae12c560e9699e401f0a0d1dc0e50acd5fca05db2 3 | size 83316898 4 | -------------------------------------------------------------------------------- /packages/autocomplete-app/src/assets/asterisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete-app/src/assets/asterisk.png -------------------------------------------------------------------------------- /packages/autocomplete-app/src/assets/carrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete-app/src/assets/carrot.png -------------------------------------------------------------------------------- /packages/autocomplete-app/src/assets/command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete-app/src/assets/command.png -------------------------------------------------------------------------------- /packages/autocomplete-app/src/assets/option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete-app/src/assets/option.png -------------------------------------------------------------------------------- /packages/autocomplete-app/src/assets/string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/autocomplete-app/src/assets/string.png -------------------------------------------------------------------------------- /tests/figterm/configs/blank/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN ~/install-fig 4 | 5 | ENTRYPOINT ["npm", "run", "test", "--"] 6 | CMD ["tests/bash", "tests/zsh"] 7 | -------------------------------------------------------------------------------- /crates/aws-toolkit-telemetry-definitions/README.md: -------------------------------------------------------------------------------- 1 | # aws-toolkit-telemetry-definitions 2 | 3 | https://github.com/aws/aws-toolkit-common/blob/main/telemetry/telemetryformat.md -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/asterisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/asterisk.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/database.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/template.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/icon-monochrome-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/icon-monochrome-light.png -------------------------------------------------------------------------------- /crates/fig_desktop_api/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod error; 2 | pub mod handler; 3 | pub mod init_script; 4 | pub mod kv; 5 | pub mod notify; 6 | pub mod requests; 7 | pub mod util; 8 | -------------------------------------------------------------------------------- /crates/fig_input_method/resources/product_icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_input_method/resources/product_icon.icns -------------------------------------------------------------------------------- /packages/api-bindings/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import base from "@amzn/eslint-config/base"; 3 | export default base({ 4 | tsconfigPath: "./tsconfig.json", 5 | }); 6 | -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/chat_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/chat_demo.gif -------------------------------------------------------------------------------- /packages/shared/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import base from "@amzn/eslint-config/base"; 3 | export default base({ 4 | tsconfigPath: "./tsconfig.eslint.json", 5 | }); 6 | -------------------------------------------------------------------------------- /tests/figterm/configs/startup/zshrc: -------------------------------------------------------------------------------- 1 | export PATH="$HOME/.local/bin:$PATH" 2 | TTY=$(tty) 3 | precmd() { 4 | q hook prompt $$ $TTY 5 | } 6 | 7 | add-zsh-hook precmd precmd 8 | -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/characters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/characters.png -------------------------------------------------------------------------------- /crates/fig_desktop/icons/autocomplete/commandkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_desktop/icons/autocomplete/commandkey.png -------------------------------------------------------------------------------- /crates/fig_integrations/src/vscode/vscode-plugin.vsix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_integrations/src/vscode/vscode-plugin.vsix -------------------------------------------------------------------------------- /extensions/gnome-extension/ambient.d.ts: -------------------------------------------------------------------------------- 1 | import "@girs/gjs"; 2 | import "@girs/gjs/dom"; 3 | import "@girs/gnome-shell/ambient"; 4 | import "@girs/gnome-shell/extensions/global"; 5 | -------------------------------------------------------------------------------- /extensions/jetbrains/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/extensions/jetbrains/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/api-bindings/src/user.ts: -------------------------------------------------------------------------------- 1 | import { sendUserLogoutRequest } from "./requests.js"; 2 | 3 | export async function logout() { 4 | return sendUserLogoutRequest({}); 5 | } 6 | -------------------------------------------------------------------------------- /packages/autocomplete/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import react from "@amzn/eslint-config/react"; 3 | export default react({ 4 | tsconfigPath: "./tsconfig.json", 5 | }); 6 | -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/desktop_entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/desktop_entry.png -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/inline_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/inline_demo.gif -------------------------------------------------------------------------------- /packages/eslint-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json"], 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-bindings-wrappers/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import base from "@amzn/eslint-config/base"; 3 | export default base({ 4 | tsconfigPath: "./tsconfig.json", 5 | }); 6 | -------------------------------------------------------------------------------- /packages/autocomplete-app/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import react from "@amzn/eslint-config/react"; 3 | export default react({ 4 | tsconfigPath: "./tsconfig.json", 5 | }); 6 | -------------------------------------------------------------------------------- /packages/autocomplete/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | environment: "jsdom", 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/translate_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/translate_demo.gif -------------------------------------------------------------------------------- /packages/shell-parser/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import base from "@amzn/eslint-config/base"; 3 | export default base({ 4 | tsconfigPath: "./tsconfig.eslint.json", 5 | }); 6 | -------------------------------------------------------------------------------- /tests/figterm/configs/emulate/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | COPY zshrc ~/.zshrc 4 | 5 | RUN ~/install-fig 6 | 7 | ENTRYPOINT ["npm", "run", "test", "--"] 8 | CMD ["tests/zsh"] 9 | -------------------------------------------------------------------------------- /tests/figterm/configs/oh-my-zsh/zshrc: -------------------------------------------------------------------------------- 1 | # The default oh-my-zsh installation location + minimal config 2 | export ZSH="$HOME/.oh-my-zsh" 3 | plugins=(git) 4 | source $ZSH/oh-my-zsh.sh 5 | -------------------------------------------------------------------------------- /crates/dbus/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(target_os = "linux")] 2 | mod dbus; 3 | #[cfg(target_os = "linux")] 4 | pub use crate::dbus::*; 5 | 6 | #[cfg(not(target_os = "linux"))] 7 | pub fn _dummy() {} 8 | -------------------------------------------------------------------------------- /packages/autocomplete-app/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | environment: "jsdom", 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/autocomplete-parser/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import base from "@amzn/eslint-config/base"; 3 | export default base({ 4 | tsconfigPath: "./tsconfig.eslint.json", 5 | }); 6 | -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/accessibility_fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/accessibility_fig.png -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/autocomplete_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/autocomplete_demo.gif -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/fig-migration/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/fig-migration/dark.png -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/scripts/update-bash-preexec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | curl -sSfL -o bash-preexec.sh https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh 4 | -------------------------------------------------------------------------------- /packages/autocomplete-parser/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | environment: "jsdom", 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Bd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Bd.ttf -------------------------------------------------------------------------------- /packages/dashboard-app/assets/fonts/Ember/AmazonEmber_He.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/fonts/Ember/AmazonEmber_He.ttf -------------------------------------------------------------------------------- /packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Lt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Lt.ttf -------------------------------------------------------------------------------- /packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Md.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Md.ttf -------------------------------------------------------------------------------- /packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Rg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Rg.ttf -------------------------------------------------------------------------------- /packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Th.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/fonts/Ember/AmazonEmber_Th.ttf -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/fig-migration/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/fig-migration/light.png -------------------------------------------------------------------------------- /extensions/vscode/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | test/** 4 | .gitignore 5 | .yarnrc 6 | vsc-extension-quickstart.md 7 | **/jsconfig.json 8 | **/*.map 9 | **/.eslintrc.json 10 | -------------------------------------------------------------------------------- /packages/dashboard-app/assets/images/gnome_shell_extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/assets/images/gnome_shell_extension.png -------------------------------------------------------------------------------- /packages/dashboard-app/src/context/zustand.ts: -------------------------------------------------------------------------------- 1 | import { Store } from "@/lib/store"; 2 | import { createContext } from "react"; 3 | 4 | export const StoreContext = createContext(null); 5 | -------------------------------------------------------------------------------- /extensions/gnome-extension/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as __imports__ from "./imports"; 2 | 3 | declare global { 4 | export const imports: typeof __imports__; 5 | } 6 | 7 | export default __imports__; 8 | -------------------------------------------------------------------------------- /packages/api-bindings/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json", "@amzn/tsconfig/dom.json"], 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src/"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/autocomplete/src/fig/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const MissingThemeError = createErrorInstance("MissingThemeError"); 4 | -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/icons/hyper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/public/images/integrations/icons/hyper.png -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/icons/iterm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/public/images/integrations/icons/iterm.png -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/icons/vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/public/images/integrations/icons/vscode.png -------------------------------------------------------------------------------- /packages/shared/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as Errors from "./errors.js"; 2 | import * as Internal from "./internal.js"; 3 | import * as Utils from "./utils.js"; 4 | 5 | export { Errors, Internal, Utils }; 6 | -------------------------------------------------------------------------------- /packages/shell-parser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json", "@amzn/tsconfig/dom.json"], 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/tsconfig/dom.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "jsx": "react", 5 | "lib": ["ESNext", "DOM", "DOM.Iterable"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/inline_shell_completion/guard_start.zsh: -------------------------------------------------------------------------------- 1 | if command -v _zsh_autosuggest_accept >/dev/null 2>&1; then 2 | export {{CLI_BINARY_NAME_UPPER}}_USING_ZSH_AUTOSUGGESTIONS=1 3 | else 4 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as __imports__ from "./imports"; 2 | 3 | declare global { 4 | export const imports: typeof __imports__; 5 | } 6 | 7 | export default __imports__; 8 | -------------------------------------------------------------------------------- /packages/autocomplete-app/src/fig/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const MissingThemeError = createErrorInstance("MissingThemeError"); 4 | -------------------------------------------------------------------------------- /packages/autocomplete/src/state/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const InsertPrefixError = createErrorInstance("InsertPrefixError"); 4 | -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/icons/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/packages/dashboard-app/public/images/integrations/icons/terminal.png -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - proto 3 | - tests/fig-api 4 | - packages/* 5 | - packages/* 6 | - extensions/vscode 7 | - extensions/gnome-legacy-extension 8 | - extensions/gnome-extension 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.rs text eol=lf 2 | Cargo.toml text eol=lf 3 | Cargo.lock text eol=lf 4 | .gitignore text eol=lf 5 | # Git LFS tracking for model files 6 | models/*.zip filter=lfs diff=lfs merge=lfs -text 7 | -------------------------------------------------------------------------------- /crates/fig_settings/src/sqlite/migrations/000_migration_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS migrations ( 2 | id INTEGER PRIMARY KEY, 3 | version INTEGER NOT NULL, 4 | migration_time INTEGER NOT NULL 5 | ); -------------------------------------------------------------------------------- /packages/autocomplete-app/src/state/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const InsertPrefixError = createErrorInstance("InsertPrefixError"); 4 | -------------------------------------------------------------------------------- /tests/figterm/configs/oh-my-zsh-autosuggestions/zshrc: -------------------------------------------------------------------------------- 1 | # The default oh-my-zsh installation location + minimal config 2 | export ZSH="$HOME/.oh-my-zsh" 3 | plugins=(zsh-autosuggestions) 4 | source $ZSH/oh-my-zsh.sh 5 | -------------------------------------------------------------------------------- /packages/api-bindings/src/native.ts: -------------------------------------------------------------------------------- 1 | import { sendOpenInExternalApplicationRequest } from "./requests.js"; 2 | 3 | export function open(url: string) { 4 | return sendOpenInExternalApplicationRequest({ url }); 5 | } 6 | -------------------------------------------------------------------------------- /packages/autocomplete-parser/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./constants.js"; 2 | export * from "./errors.js"; 3 | export * from "./loadHelpers.js"; 4 | export * from "./loadSpec.js"; 5 | export * from "./parseArguments.js"; 6 | -------------------------------------------------------------------------------- /extensions/gnome-extension/resources/ui/adw/Preferences.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /packages/api-bindings-wrappers/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./executeCommandWrappers.js"; 2 | export * from "./executeCommand.js"; 3 | export * from "./fs.js"; 4 | export * from "./state.js"; 5 | export * from "./settings.js"; 6 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/fig_settings/src/sqlite/migrations/003_improved_history_timing.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE history RENAME COLUMN time TO start_time; 2 | ALTER TABLE history ADD COLUMN end_time INTEGER; 3 | ALTER TABLE history ADD COLUMN duration INTEGER; 4 | -------------------------------------------------------------------------------- /extensions/gnome-extension/resources/amazon-q-for-cli-gnome-integration.gresource: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/extensions/gnome-extension/resources/amazon-q-for-cli-gnome-integration.gresource -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/api-bindings-wrappers/src/fs.ts: -------------------------------------------------------------------------------- 1 | import { fs as FileSystem } from "@aws/amazon-q-developer-cli-api-bindings"; 2 | 3 | export const fread = (path: string): Promise => 4 | FileSystem.read(path).then((out) => out ?? ""); 5 | -------------------------------------------------------------------------------- /packages/shared/src/errors.ts: -------------------------------------------------------------------------------- 1 | export const createErrorInstance = (name: string) => 2 | class extends Error { 3 | constructor(message?: string) { 4 | super(message); 5 | this.name = `AmazonQ.${name}`; 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.x86_64-pc-windows-msvc] 2 | rustflags = [ 3 | "-C", "link-arg=/STACK:8000000" 4 | ] 5 | 6 | # 64 bit Mingw 7 | [target.x86_64-pc-windows-gnu] 8 | rustflags = [ 9 | "-C", "link-arg=-Wl,--stack,8000000" 10 | ] -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/figterm/src/input/README.md: -------------------------------------------------------------------------------- 1 | # Input Module 2 | 3 | This module provides keymap/keycode parsing for input on stdin. It is 4 | largely taken from [wezterm](https://www.github.com/wez/wezterm), and in 5 | particular the `termwiz` crate. 6 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/resources/ui/adw/Preferences.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /tests/fig-api/src/util.ts: -------------------------------------------------------------------------------- 1 | import { tmpdir } from "node:os"; 2 | import { mkdtempSync, realpathSync } from "node:fs"; 3 | import { join } from "node:path"; 4 | 5 | export const tempDir = realpathSync(mkdtempSync(join(tmpdir(), "fig-test-"))); 6 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /proto/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | inputs: 3 | - directory: . 4 | plugins: 5 | - local: protoc-gen-es 6 | opt: 7 | - target=js+dts 8 | - import_extension=js 9 | - json_types=false 10 | out: dist 11 | 12 | -------------------------------------------------------------------------------- /tests/figterm/configs/prezto/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN git clone --recursive https://github.com/sorin-ionescu/prezto.git "$HOME/.zprezto" 4 | RUN ~/install-fig 5 | 6 | ENTRYPOINT ["npm", "run", "test", "--"] 7 | CMD ["tests/zsh"] 8 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /tests/fig-api/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | clearMocks: true, 6 | environment: "jsdom", 7 | setupFiles: ["src/setup.ts"], 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | // vitest.config.ts 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | test: { 6 | coverage: { 7 | reporter: ["text", "json", "html", "lcov"], 8 | }, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /bundle/linux/desktop/usr/lib/environment.d/60-fig.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Environment variables set by Fig 3 | # to ensure ibus is the IM in applications 4 | # 5 | GTK_IM_MODULE=ibus 6 | QT_IM_MODULE=ibus 7 | XMODIFIERS=@im=ibus 8 | GLFW_IM_MODULE=ibus 9 | 10 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![warn(rust_2018_idioms, future_incompatible)] 2 | 3 | pub mod ansi; 4 | pub mod event; 5 | pub mod grid; 6 | pub mod index; 7 | pub mod term; 8 | 9 | pub use crate::grid::Grid; 10 | pub use crate::term::Term; 11 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/intellij/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(target_os = "macos")] 2 | mod macos; 3 | #[cfg(target_os = "macos")] 4 | pub use macos::*; 5 | 6 | #[cfg(target_os = "linux")] 7 | mod linux; 8 | #[cfg(target_os = "linux")] 9 | pub use linux::*; 10 | -------------------------------------------------------------------------------- /extensions/gnome-extension/types/gi.d.ts: -------------------------------------------------------------------------------- 1 | export * as Adw from "./.adw"; 2 | export * as Gio from "./.gio"; 3 | export * as GLib from "./.glib"; 4 | export * as GObject from "./.gobject"; 5 | export * as Gtk from "./.gtk"; 6 | export * as Meta from "./meta"; 7 | -------------------------------------------------------------------------------- /bundle/deb/control_minimal: -------------------------------------------------------------------------------- 1 | Package: amazon-q-minimal 2 | Description: Amazon Q CLI for Linux 3 | Maintainer: Amazon Q CLI Team 4 | Homepage: https://github.com/aws/q-cli 5 | Version: $VERSION 6 | Architecture: $APT_ARCH 7 | Conflicts: amazon-q 8 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/resources/amazon-q-for-cli-legacy-gnome-integration.gresource: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/extensions/gnome-legacy-extension/resources/amazon-q-for-cli-legacy-gnome-integration.gresource -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/types/gi.d.ts: -------------------------------------------------------------------------------- 1 | export * as Adw from "./.adw"; 2 | export * as Gio from "./.gio"; 3 | export * as GLib from "./.glib"; 4 | export * as GObject from "./.gobject"; 5 | export * as Gtk from "./.gtk"; 6 | export * as Meta from "./meta"; 7 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json", "@amzn/tsconfig/dom.json"], 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "types": ["@amzn/types", "@withfig/autocomplete-types"] 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/clear_underline/alacritty.recording: -------------------------------------------------------------------------------- 1 | [undeadleech@undeadlap alacritty]$ echo -e "\e[4mUNDERLINED" 2 | UNDERLINED 3 | [undeadleech@undeadlap alacritty]$ clear 4 | [undeadleech@undeadlap alacritty]$ exit 5 | exit 6 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/pages/settings/keybindings.tsx: -------------------------------------------------------------------------------- 1 | import { UserPrefView } from "@/components/preference/list"; 2 | import keybindings from "@/data/keybindings"; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /tests/figterm/base.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | dotenv-base: 3 | image: dotenv-base 4 | build: 5 | context: ../../ 6 | dockerfile: ./tests/figterm/Dockerfile 7 | volumes: 8 | - ./:/usr/home/app/ 9 | - /usr/home/app/node_modules 10 | -------------------------------------------------------------------------------- /bundle/linux/desktop/usr/lib/systemd/user/fig.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Fig Desktop App 3 | After=multi-user.target 4 | Wants=graphical.target 5 | 6 | [Service] 7 | ExecStart=/usr/bin/fig_desktop --no-dashboard 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/colored_reset/alacritty.recording: -------------------------------------------------------------------------------- 1 | [undeadleech@archhq colored_reset]$ printf "\e[41m" 2 | [undeadleech@archhq colored_reset]$ [undeadleech@archhq colored_reset]$ printf "\e[0m" 3 | [undeadleech@archhq colored_reset]$ ls - -------------------------------------------------------------------------------- /crates/fig_integrations/src/intellij/instrumented-codewhisperer-for-command-line-companion-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli-autocomplete/HEAD/crates/fig_integrations/src/intellij/instrumented-codewhisperer-for-command-line-companion-1.0.4.jar -------------------------------------------------------------------------------- /crates/fig_settings/src/sqlite/migrations/005_auth_table.sql: -------------------------------------------------------------------------------- 1 | -- We create a separate auth_kv to ensure the data is not available in all the same 2 | -- places that the state is available in 3 | CREATE TABLE auth_kv ( 4 | key TEXT PRIMARY KEY, 5 | value TEXT 6 | ); 7 | -------------------------------------------------------------------------------- /extensions/jetbrains/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. 2 | 3 | rootProject.name = 'codewhisperer-for-command-line-companion' 4 | -------------------------------------------------------------------------------- /extensions/vscode/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "checkJs": false, /* Typecheck .js files. */ 6 | "lib": [ 7 | "es6" 8 | ] 9 | }, 10 | "exclude": [ 11 | "node_modules" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /extensions/jetbrains/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /extensions/jetbrains/src/main/java/io/fig/jetbrains/entries/ITerminalEntry.java: -------------------------------------------------------------------------------- 1 | package io.fig.jetbrains.entries; 2 | 3 | import com.intellij.ui.content.ContentManager; 4 | 5 | public interface ITerminalEntry { 6 | 7 | void register(ContentManager contentManager); 8 | } 9 | -------------------------------------------------------------------------------- /extensions/jetbrains/src/main/java/io/fig/jetbrains/instruments/TerminalInstrumentationType.java: -------------------------------------------------------------------------------- 1 | package io.fig.jetbrains.instruments; 2 | 3 | public enum TerminalInstrumentationType { 4 | ADDED, 5 | REMOVED, 6 | FOCUSED, 7 | UNFOCUSED, 8 | ; 9 | } 10 | -------------------------------------------------------------------------------- /packages/api-bindings-wrappers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json", "@amzn/tsconfig/dom.json"], 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "types": ["@withfig/autocomplete-types", "@amzn/types"] 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/autocomplete-parser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json", "@amzn/tsconfig/dom.json"], 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "types": ["@withfig/autocomplete-types", "@amzn/types"] 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Event stream related primitives such as `Message` or `Header`. 4 | pub mod event_stream; 5 | 6 | pub(crate) mod sealed_enum_unknown; 7 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/pages/terminal/translate.tsx: -------------------------------------------------------------------------------- 1 | import { UserPrefView } from "@/components/preference/list"; 2 | import settings, { intro } from "@/data/translate"; 3 | 4 | export default function Page() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /tests/figterm/configs/oh-my-zsh/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 4 | COPY zshrc ~/.zshrc 5 | RUN ~/install-fig 6 | 7 | ENTRYPOINT ["npm", "run", "test", "--"] 8 | CMD ["tests/zsh"] 9 | -------------------------------------------------------------------------------- /packages/shell-parser/src/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const SubstituteAliasError = createErrorInstance("SubstituteAliasError"); 4 | export const ConvertCommandError = createErrorInstance("ConvertCommandError"); 5 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ESNext", 4 | "moduleResolution": "Node", 5 | "target": "ES2020", 6 | "strictNullChecks": true, 7 | "strictFunctionTypes": true 8 | }, 9 | "include": [ "./**/*.js" ] 10 | } -------------------------------------------------------------------------------- /tests/figterm/configs/oh-my-zsh-autosuggestions/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 4 | COPY zshrc ~/.zshrc 5 | RUN ~/install-fig 6 | 7 | ENTRYPOINT ["npm", "run", "test", "--"] 8 | CMD ["tests/zsh"] 9 | -------------------------------------------------------------------------------- /packages/autocomplete-app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/autocomplete/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/dashboard-app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.87.0" 3 | profile = "minimal" 4 | components = ["rustfmt", "clippy"] 5 | targets = [ 6 | "x86_64-apple-darwin", 7 | "aarch64-apple-darwin", 8 | "x86_64-unknown-linux-gnu", 9 | "wasm32-wasip1", 10 | "x86_64-pc-windows-msvc", 11 | ] 12 | -------------------------------------------------------------------------------- /tests/fig-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@amzn/tsconfig/base.json"], 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "lib": ["ESNext", "DOM", "DOM.Iterable"], 6 | "types": ["@amzn/types", "node"], 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["node_modules"] 10 | } 11 | -------------------------------------------------------------------------------- /tests/figterm/configs/powerlevel10k/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k 4 | COPY zshrc ~/.zshrc 5 | COPY p10k.zsh ~/.p10k.zsh 6 | RUN ~/install-fig 7 | 8 | ENTRYPOINT ["npm", "run", "test", "--"] 9 | CMD ["tests/zsh"] 10 | -------------------------------------------------------------------------------- /tests/figterm/configs/starship/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | COPY bashrc ~/.bashrc 4 | COPY zshrc ~/.zshrc 5 | 6 | RUN sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --yes 7 | 8 | RUN ~/install-fig 9 | 10 | ENTRYPOINT ["npm", "run", "test", "--"] 11 | CMD ["tests/bash", "tests/zsh"] 12 | -------------------------------------------------------------------------------- /bundle/linux/desktop/usr/share/applications/fig.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=Fig 5 | Comment=Autocomplete for the Terminal 6 | TryExec=fig_desktop 7 | Exec=fig_desktop %u 8 | Icon=fig 9 | Terminal=false 10 | Categories=Development; 11 | MimeType=x-scheme-handler/fig 12 | -------------------------------------------------------------------------------- /crates/macos-utils/appkit-nsworkspace-bindings/build.rs: -------------------------------------------------------------------------------- 1 | #[cfg(target_os = "macos")] 2 | mod build_mac; 3 | #[cfg(target_os = "macos")] 4 | use crate::build_mac::build; 5 | 6 | #[cfg(target_os = "macos")] 7 | fn main() { 8 | build(); 9 | } 10 | 11 | #[cfg(not(target_os = "macos"))] 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /tests/figterm/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest/presets/js-with-ts', 3 | testPathIgnorePatterns: ['/node_modules/', '/mocks/', '/parserCorpus/'], 4 | coveragePathIgnorePatterns: ['/mocks/', '/parserCorpus/'], 5 | testEnvironment: 'jsdom', 6 | reporters: ['./jest-reporter.js'], 7 | }; 8 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/saved_cursor_alt/alacritty.recording: -------------------------------------------------------------------------------- 1 | [undeadleech@archhq saved_cursor_alt]$ echo -e "\e(0\e[10;$(tput cols)H \e[?1049h\e7 \e[?1049l \e(B\e[H \e[?1049h test\e8xxx" 2 | (0 [?1049h7 [?1049l (B [?1049h test8xxx 3 | [undeadleech@archhq saved_cursor_alt]$ exit 4 | exit 5 | -------------------------------------------------------------------------------- /tests/figterm/configs/powerlevel10k/zshrc: -------------------------------------------------------------------------------- 1 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 2 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 3 | fi 4 | 5 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 6 | 7 | source ~/powerlevel10k/powerlevel10k.zsh-theme 8 | -------------------------------------------------------------------------------- /bundle/linux/README: -------------------------------------------------------------------------------- 1 | To install the Amazon Q CLI run the install.sh script 2 | 3 | ./install.sh 4 | 5 | To enable support for SSH if this is being installed on a remote machine, 6 | run the following lines then restart sshd and reconnect to the machine. 7 | 8 | AcceptEnv Q_SET_PARENT 9 | AllowStreamLocalForwarding yes 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /bundle/deb/control: -------------------------------------------------------------------------------- 1 | Package: amazon-q 2 | Description: Amazon Q CLI for Linux 3 | Maintainer: Amazon Q CLI Team 4 | Homepage: https://github.com/aws/q-cli 5 | Version: $VERSION 6 | Architecture: $APT_ARCH 7 | Conflicts: amazon-q-minimal 8 | Depends: libayatana-appindicator3-1, libwebkit2gtk-4.1-0, libgtk-3-0, util-linux 9 | -------------------------------------------------------------------------------- /crates/fig_telemetry_core/README.md: -------------------------------------------------------------------------------- 1 | # fig_telemetry_core 2 | 3 | Core primitives for emitting telemetry events. 4 | 5 | ## Overview 6 | 7 | This crate is intended to provide the interface for sending telemetry events, 8 | delegating the responsibility of sending the actual request to [fig_telemetry](../fig_telemetry). 9 | 10 | -------------------------------------------------------------------------------- /proto/buf.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | deps: [] 3 | build: 4 | excludes: 5 | - node_modules 6 | breaking: 7 | use: 8 | - WIRE_JSON 9 | lint: 10 | use: 11 | - STANDARD 12 | except: 13 | - ENUM_ZERO_VALUE_SUFFIX 14 | - PACKAGE_VERSION_SUFFIX 15 | - DIRECTORY_SAME_PACKAGE 16 | - PACKAGE_DIRECTORY_MATCH 17 | -------------------------------------------------------------------------------- /crates/q_cli/src/cli/doctor/checks/mod.rs: -------------------------------------------------------------------------------- 1 | mod bash_version; 2 | mod fish_version; 3 | #[cfg(target_os = "linux")] 4 | pub mod linux; 5 | mod midway; 6 | mod sshd_config; 7 | 8 | pub use bash_version::BashVersionCheck; 9 | pub use fish_version::FishVersionCheck; 10 | pub use midway::MidwayCheck; 11 | pub use sshd_config::SshdConfigCheck; 12 | -------------------------------------------------------------------------------- /packages/types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@amzn/types", 3 | "private": true, 4 | "version": "0.1.0", 5 | "license": "MIT OR Apache-2.0", 6 | "author": "Amazon Web Services", 7 | "repository": "https://github.com/aws/amazon-q-developer-cli", 8 | "types": "global.d.ts", 9 | "files": [ 10 | "global.d.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /crates/fig_desktop_api/src/notify.rs: -------------------------------------------------------------------------------- 1 | use std::hash::Hash; 2 | 3 | use dashmap::DashMap; 4 | use fig_proto::fig::NotificationType; 5 | use fnv::FnvBuildHasher; 6 | 7 | pub struct NotificationHandler 8 | where 9 | K: Hash + Eq + PartialEq, 10 | { 11 | pub subscriptions: DashMap<(K, NotificationType), i64, FnvBuildHasher>, 12 | } 13 | -------------------------------------------------------------------------------- /extensions/jetbrains/src/main/java/io/fig/jetbrains/instruments/ITerminalInstrumentation.java: -------------------------------------------------------------------------------- 1 | package io.fig.jetbrains.instruments; 2 | 3 | import com.intellij.ui.content.Content; 4 | 5 | public interface ITerminalInstrumentation { 6 | 7 | void instrumentTerminalContent(Content content, int id, TerminalInstrumentationType instrumentation); 8 | } 9 | -------------------------------------------------------------------------------- /tests/figterm/configs/pure/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | # https://github.com/sindresorhus/pure 4 | # Use manual install. 5 | RUN mkdir -p "$HOME/.zsh" 6 | RUN git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure" 7 | COPY zshrc ~/.zshrc 8 | RUN ~/install-fig 9 | 10 | ENTRYPOINT ["npm", "run", "test", "--"] 11 | CMD ["tests/zsh"] 12 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/operation.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_types::request_id::RequestId; 3 | 4 | /// Types for the `GenerateCodeFromCommands` operation. 5 | pub mod generate_code_from_commands; 6 | 7 | /// Types for the `SendMessage` operation. 8 | pub mod send_message; 9 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/types/builders.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::_error_details::ErrorDetailsBuilder; 3 | pub use crate::types::_metadata_entry::MetadataEntryBuilder; 4 | pub use crate::types::_metric_datum::MetricDatumBuilder; 5 | pub use crate::types::_userdata::UserdataBuilder; 6 | -------------------------------------------------------------------------------- /crates/fig_settings/src/sqlite/migrations/001_history_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS history ( 2 | id INTEGER PRIMARY KEY, 3 | command TEXT, 4 | shell TEXT, 5 | pid INTEGER, 6 | session_id TEXT, 7 | cwd TEXT, 8 | time INTEGER, 9 | in_ssh INTEGER, 10 | in_docker INTEGER, 11 | hostname TEXT, 12 | exit_code INTEGER 13 | ); 14 | -------------------------------------------------------------------------------- /extensions/vscode/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | 4 | 5 | /** @type {import('eslint').Linter.Config[]} */ 6 | export default [ 7 | {files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}}, 8 | {languageOptions: { globals: {...globals.browser, ...globals.node} }}, 9 | pluginJs.configs.recommended, 10 | ]; -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("codewhisperer", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /packages/autocomplete/src/history/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const MissingSpecError = createErrorInstance("MissingSpecError"); 4 | export const HistoryReadingError = createErrorInstance("HistoryReadingError"); 5 | export const SuggestionNotFoundError = createErrorInstance( 6 | "SuggestionNotFoundError", 7 | ); 8 | -------------------------------------------------------------------------------- /packages/shell-parser/tests/fixtures/basic/input.sh: -------------------------------------------------------------------------------- 1 | ### Case 1 2 | a b\\ c 3 | 4 | ### Case 2 5 | a "b" 6 | 7 | ### Case 3 8 | a 'b' 9 | 10 | ### Case 4 11 | a $'b' 12 | 13 | ### Case 5 14 | a $commit 15 | 16 | ### Case 6 17 | a $$ 18 | 19 | ### Case 7 20 | a $((b)) 21 | 22 | ### Case 8 23 | a $(b) 24 | 25 | ### Case 9 26 | a \`b\` 27 | 28 | ### Case 10 29 | a $(\`b\`) 30 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_http::user_agent::ApiMetadata = 3 | ::aws_http::user_agent::ApiMetadata::new("toolkittelemetry", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/fig_api_client/src/clients/mod.rs: -------------------------------------------------------------------------------- 1 | mod client; 2 | pub(crate) mod shared; 3 | mod streaming_client; 4 | 5 | pub use client::{ 6 | Client, 7 | FILE_CONTEXT_FILE_NAME_MAX_LEN, 8 | FILE_CONTEXT_LEFT_FILE_CONTENT_MAX_LEN, 9 | FILE_CONTEXT_RIGHT_FILE_CONTENT_MAX_LEN, 10 | }; 11 | pub use streaming_client::{ 12 | SendMessageOutput, 13 | StreamingClient, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/autocomplete-app/src/history/errors.ts: -------------------------------------------------------------------------------- 1 | import { createErrorInstance } from "@aws/amazon-q-developer-cli-shared/errors"; 2 | 3 | export const MissingSpecError = createErrorInstance("MissingSpecError"); 4 | export const HistoryReadingError = createErrorInstance("HistoryReadingError"); 5 | export const SuggestionNotFoundError = createErrorInstance( 6 | "SuggestionNotFoundError", 7 | ); 8 | -------------------------------------------------------------------------------- /packages/fuzzysort/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@aws/amazon-q-developer-cli-fuzzysort", 3 | "version": "0.1.0", 4 | "license": "MIT", 5 | "author": "Amazon Web Services", 6 | "repository": "https://github.com/aws/amazon-q-developer-cli", 7 | "type": "module", 8 | "exports": "./fuzzysort.js", 9 | "types": "./fuzzysort.d.ts", 10 | "files": [ 11 | "*" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /tests/figterm/jest-reporter.js: -------------------------------------------------------------------------------- 1 | // reporter.js 2 | 3 | // jest can't transpile transformers on the fly so we help him 4 | // https://github.com/facebook/jest/issues/10105 5 | 6 | /* eslint-disable import/no-extraneous-dependencies */ 7 | const tsNode = require('ts-node/register/transpile-only'); 8 | const Reporter = require('./jest-reporter.ts'); 9 | 10 | module.exports = Reporter; 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("codewhispererruntime", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/fig_test_macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fig_test_macro" 3 | authors.workspace = true 4 | edition.workspace = true 5 | homepage.workspace = true 6 | publish.workspace = true 7 | version.workspace = true 8 | license.workspace = true 9 | 10 | [lints] 11 | workspace = true 12 | 13 | [lib] 14 | proc-macro = true 15 | 16 | [dependencies] 17 | quote = "1.0.40" 18 | syn = "2.0.101" 19 | -------------------------------------------------------------------------------- /extensions/gnome-extension/README.md: -------------------------------------------------------------------------------- 1 | # Amazon Q GNOME Shell Extension 2 | 3 | Provides Amazon Q CLI with information about where windows are onscreen when running 4 | under Wayland with GNOME. This is required because wayland doesn't allow clients 5 | to query the compositor about the position or size of other clients. 6 | 7 | ## Developing 8 | 9 | See [CONTRIBUTING.md](./CONTRIBUTING.md) 10 | -------------------------------------------------------------------------------- /packages/api-bindings/src/codewhisperer.ts: -------------------------------------------------------------------------------- 1 | import { CodewhispererCustomization as Customization } from "@aws/amazon-q-developer-cli-proto/fig"; 2 | import { sendCodewhispererListCustomizationRequest } from "./requests.js"; 3 | 4 | const listCustomizations = async () => 5 | (await sendCodewhispererListCustomizationRequest({})).customizations; 6 | 7 | export { listCustomizations, Customization }; 8 | -------------------------------------------------------------------------------- /packages/autocomplete/src/telemetry.ts: -------------------------------------------------------------------------------- 1 | import { Telemetry } from "@aws/amazon-q-developer-cli-api-bindings"; 2 | import { version } from "../package.json"; 3 | 4 | export const trackEvent = ( 5 | event: string, 6 | props: Record, 7 | ) => 8 | Telemetry.track(event, { 9 | ...props, 10 | autocomplete_engine_version: version, 11 | }); 12 | -------------------------------------------------------------------------------- /packages/dashboard-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /packages/eslint-config/README.md: -------------------------------------------------------------------------------- 1 | # :warning: This repository has been transferred to the `autocomplete-engine` repo, update the package from there. 2 | 3 | ## @amzn/eslint-config 4 | 5 | This repo provides a shared eslint config for Fig repos to make 6 | bootstrapping Typescript repos easier. 7 | 8 | To update this package run `yarn publish` and bump the version number 9 | accordingly. 10 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("qdeveloperstreaming", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /extensions/gnome-extension/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "NodeNext", 4 | "moduleResolution": "NodeNext", 5 | "outDir": "./dist", 6 | "sourceMap": false, 7 | "strict": false, 8 | "target": "ES2022", 9 | "lib": ["ES2022"], 10 | "skipLibCheck": true 11 | }, 12 | "include": ["ambient.d.ts"], 13 | "files": ["src/extension.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /extensions/gnome-extension/types/imports.d.ts: -------------------------------------------------------------------------------- 1 | import * as Gio from "./.gio"; 2 | 3 | export * as gi from "./gi"; 4 | 5 | export module ui { 6 | export module panel {} 7 | 8 | export module main {} 9 | } 10 | 11 | export module misc { 12 | export module extensionUtils { 13 | export function getExtension(): any; 14 | export function getSettings(): Gio.Settings; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/eslint.config.js: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | 4 | /** @type {import('eslint').Linter.Config[]} */ 5 | export default [ 6 | { files: ["src/*.js"], languageOptions: { sourceType: "commonjs" } }, 7 | { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, 8 | pluginJs.configs.recommended, 9 | ]; 10 | -------------------------------------------------------------------------------- /packages/autocomplete-app/src/telemetry.ts: -------------------------------------------------------------------------------- 1 | import { Telemetry } from "@aws/amazon-q-developer-cli-api-bindings"; 2 | import { version } from "../package.json"; 3 | 4 | export const trackEvent = ( 5 | event: string, 6 | props: Record, 7 | ) => 8 | Telemetry.track(event, { 9 | ...props, 10 | autocomplete_engine_version: version, 11 | }); 12 | -------------------------------------------------------------------------------- /packages/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@amzn/tsconfig", 3 | "private": true, 4 | "version": "0.1.0", 5 | "license": "MIT OR Apache-2.0", 6 | "author": "Amazon Web Services", 7 | "repository": "https://github.com/aws/amazon-q-developer-cli", 8 | "peerDependencies": { 9 | "typescript": "*" 10 | }, 11 | "files": [ 12 | "base.json", 13 | "dom.json" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("codewhispererstreaming", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/fig_util/src/process_info/freebsd.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use super::{ 4 | Pid, 5 | PidExt, 6 | }; 7 | 8 | impl PidExt for Pid { 9 | fn current() -> Self { 10 | nix::unistd::getpid().into() 11 | } 12 | 13 | fn parent(&self) -> Option { 14 | None 15 | } 16 | 17 | fn exe(&self) -> Option { 18 | None 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /crates/macos-utils/appkit-nsworkspace-bindings/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_upper_case_globals)] 2 | #![allow(non_camel_case_types)] 3 | #![allow(non_snake_case)] 4 | #![allow(improper_ctypes)] 5 | #![allow(dead_code)] 6 | #![allow(unexpected_cfgs)] 7 | #![allow(clippy::all)] 8 | #![allow(unsafe_op_in_unsafe_fn)] 9 | #[cfg(target_os = "macos")] 10 | include!(concat!(env!("OUT_DIR"), "/nsworkspace.rs")); 11 | -------------------------------------------------------------------------------- /extensions/gnome-extension/resources/icons/scalable/actions/fig-connected-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/README.md: -------------------------------------------------------------------------------- 1 | # Amazon Q GNOME Shell Extension 2 | 3 | Provides Amazon Q CLI with information about where windows are onscreen when running 4 | under Wayland with GNOME. This is required because wayland doesn't allow clients 5 | to query the compositor about the position or size of other clients. 6 | 7 | ## Developing 8 | 9 | See [CONTRIBUTING.md](./CONTRIBUTING.md) 10 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/types/imports.d.ts: -------------------------------------------------------------------------------- 1 | import * as Gio from "./.gio"; 2 | 3 | export * as gi from "./gi"; 4 | 5 | export module ui { 6 | export module panel {} 7 | 8 | export module main {} 9 | } 10 | 11 | export module misc { 12 | export module extensionUtils { 13 | export function getExtension(): any; 14 | export function getSettings(): Gio.Settings; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Cross.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | pre-build = ["apt-get update && apt-get --assume-yes install unzip zsh"] 3 | 4 | [build.env] 5 | passthrough = [ 6 | "AMAZON_Q_BUILD_TARGET_TRIPLE", 7 | "AMAZON_Q_BUILD_VARIANT", 8 | "AMAZON_Q_BUILD_HASH", 9 | "AMAZON_Q_BUILD_DATETIME", 10 | "AMAZON_Q_BUILD_SKIP_FISH_TESTS", 11 | "AMAZON_Q_BUILD_SKIP_SHELLCHECK_TESTS", 12 | "Q_TELEMETRY_CLIENT_ID", 13 | ] 14 | -------------------------------------------------------------------------------- /crates/fig_proto/src/util.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[derive(Debug, Error)] 4 | pub enum GetShellError { 5 | #[error("not yet implemented for windows")] 6 | NoParent, 7 | } 8 | 9 | pub fn get_shell() -> Result { 10 | fig_util::get_parent_process_exe() 11 | .ok_or(GetShellError::NoParent) 12 | .map(|path| path.to_string_lossy().to_string()) 13 | } 14 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/resources/icons/scalable/actions/fig-connected-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; 2 | 3 | const Collapsible = CollapsiblePrimitive.Root; 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }; 10 | -------------------------------------------------------------------------------- /crates/fig_install/src/freebsd.rs: -------------------------------------------------------------------------------- 1 | use tokio::sync::mpsc::Sender; 2 | 3 | use crate::index::UpdatePackage; 4 | use crate::{ 5 | Error, 6 | UpdateStatus, 7 | }; 8 | 9 | pub(crate) async fn update( 10 | _package: UpdatePackage, 11 | _tx: Sender, 12 | _interactive: bool, 13 | _relaunch_dashboard: bool, 14 | ) -> Result<(), Error> { 15 | Err(Error::PackageManaged) 16 | } 17 | -------------------------------------------------------------------------------- /crates/figterm/tests/cli.rs: -------------------------------------------------------------------------------- 1 | use std::process::Command; 2 | 3 | use assert_cmd::prelude::*; 4 | use predicates::prelude::*; 5 | 6 | #[test] 7 | fn version_flag_has_status_code_zero() { 8 | let mut cmd = Command::cargo_bin("figterm").unwrap(); 9 | cmd.arg("--version"); 10 | 11 | cmd.assert() 12 | .success() 13 | .stdout(predicate::str::contains(env!("CARGO_PKG_VERSION"))); 14 | } 15 | -------------------------------------------------------------------------------- /tests/figterm/index.ts: -------------------------------------------------------------------------------- 1 | import Shell, { PTYOptions } from './src/shell'; 2 | 3 | const main = async () => { 4 | const shell = new Shell(); 5 | await shell.initialize({ shell: 'bash' }); 6 | const res = await shell.execute('echo hello'); 7 | console.log({ output: res }); 8 | await shell.type('echo hi'); 9 | console.log({ buffer: shell.buffer }); 10 | await shell.kill(); 11 | }; 12 | 13 | main(); 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App.tsx"; 4 | import { BrowserRouter } from "react-router-dom"; 5 | import "./index.css"; 6 | 7 | ReactDOM.createRoot(document.getElementById("root")!).render( 8 | 9 | 10 | 11 | 12 | , 13 | ); 14 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/operation.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_types::request_id::RequestId; 3 | 4 | /// Types for the `PostErrorReport` operation. 5 | pub mod post_error_report; 6 | 7 | /// Types for the `PostFeedback` operation. 8 | pub mod post_feedback; 9 | 10 | /// Types for the `PostMetrics` operation. 11 | pub mod post_metrics; 12 | -------------------------------------------------------------------------------- /crates/macos-utils/appkit-nsworkspace-bindings/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "appkit-nsworkspace-bindings" 3 | authors.workspace = true 4 | edition.workspace = true 5 | homepage.workspace = true 6 | publish.workspace = true 7 | version.workspace = true 8 | 9 | [target.'cfg(target_os = "macos")'.build-dependencies] 10 | bindgen = "0.71.1" 11 | 12 | [target.'cfg(target_os = "macos")'.dependencies] 13 | objc.workspace = true 14 | -------------------------------------------------------------------------------- /packages/dashboard-app/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/hooks/store/usePlatformInfo.ts: -------------------------------------------------------------------------------- 1 | import { StoreContext } from "@/context/zustand"; 2 | import { useContext } from "react"; 3 | import { useStore } from "zustand"; 4 | 5 | export function usePlatformInfo() { 6 | const store = useContext(StoreContext); 7 | if (!store) throw new Error("Missing StoreContext.Provider in the tree"); 8 | return useStore(store, (state) => state.platformInfo); 9 | } 10 | -------------------------------------------------------------------------------- /tests/figterm/configs/startup/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN ~/install-fig 4 | 5 | RUN rm -rf ~/.profile ~/.zprofile 6 | RUN mkdir -p ~/withfig ~/withoutfig 7 | RUN mv ~/.bashrc ~/.zshrc ~/withfig 8 | 9 | # Copy configs without fig from this dir 10 | COPY ./bashrc /usr/home/withoutfig/.bashrc 11 | COPY ./zshrc /usr/home/withoutfig/.zshrc 12 | 13 | ENTRYPOINT ["npm", "run", "test", "--"] 14 | CMD ["tests/startup"] 15 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/fig_auth/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod builder_id; 2 | pub mod consts; 3 | mod error; 4 | pub mod pkce; 5 | mod scope; 6 | pub mod secret_store; 7 | 8 | pub use builder_id::{ 9 | builder_id_token, 10 | is_amzn_user, 11 | is_logged_in, 12 | logout, 13 | refresh_token, 14 | }; 15 | pub use consts::{ 16 | AMZN_START_URL, 17 | START_URL, 18 | }; 19 | pub use error::Error; 20 | pub(crate) use error::Result; 21 | -------------------------------------------------------------------------------- /crates/fig_input_method/src/main.rs: -------------------------------------------------------------------------------- 1 | #[cfg(target_os = "macos")] 2 | mod imk; 3 | #[cfg(target_os = "macos")] 4 | mod macos; 5 | 6 | #[cfg(not(target_os = "macos"))] 7 | use std::process::ExitCode; 8 | 9 | #[cfg(target_os = "macos")] 10 | pub use macos::main; 11 | 12 | #[cfg(not(target_os = "macos"))] 13 | fn main() -> ExitCode { 14 | println!("Fig input method is only supported on macOS"); 15 | ExitCode::FAILURE 16 | } 17 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | command -v q >/dev/null 2>&1 && eval "$(q init zsh pre --rcfile zshrc)" 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | command -v q >/dev/null 2>&1 && eval "$(q init zsh post --rcfile zshrc)" 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | command -v q >/dev/null 2>&1 && eval "$(q init zsh pre --rcfile zprofile)" 10 | -------------------------------------------------------------------------------- /crates/q_cli/tests/cli_user.rs: -------------------------------------------------------------------------------- 1 | mod common; 2 | 3 | use common::*; 4 | 5 | #[ignore = "TODO: Fix json output"] 6 | #[test] 7 | fn user_whoami() -> Result<()> { 8 | cli().args(["user", "whoami"]).assert().code(predicate::in_iter([0, 1])); 9 | cli() 10 | .args(["user", "whoami", "-f", "json"]) 11 | .assert() 12 | .stdout(is_json()) 13 | .code(predicate::in_iter([0, 1])); 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /crates/semantic_search_client/src/processing/mod.rs: -------------------------------------------------------------------------------- 1 | /// File processing utilities for handling different file types and extracting content 2 | pub mod file_processor; 3 | /// Text chunking utilities for breaking down text into manageable pieces for embedding 4 | pub mod text_chunker; 5 | 6 | pub use file_processor::{ 7 | get_file_type, 8 | process_directory, 9 | process_file, 10 | }; 11 | pub use text_chunker::chunk_text; 12 | -------------------------------------------------------------------------------- /extensions/gnome-extension/eslint.config.js: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | import tseslint from "typescript-eslint"; 4 | 5 | 6 | /** @type {import('eslint').Linter.Config[]} */ 7 | export default [ 8 | {files: ["**/*.{js,mjs,cjs,ts}"]}, 9 | {languageOptions: { globals: {...globals.browser, ...globals.node} }}, 10 | pluginJs.configs.recommended, 11 | ...tseslint.configs.recommended, 12 | ]; -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zprofile.post.zsh.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | command -v q >/dev/null 2>&1 && eval "$(q init zsh post --rcfile zprofile)" 10 | -------------------------------------------------------------------------------- /crates/figterm/src/logger.rs: -------------------------------------------------------------------------------- 1 | use std::fmt::Display; 2 | 3 | use fig_log::get_log_level_max; 4 | use tracing::Level; 5 | 6 | pub fn stdio_debug_log(s: impl Display) { 7 | if get_log_level_max() >= Level::DEBUG { 8 | println!("{s}"); 9 | } 10 | } 11 | 12 | #[cfg(test)] 13 | mod tests { 14 | use super::*; 15 | 16 | #[test] 17 | fn test_stdio_debug_log() { 18 | stdio_debug_log("test"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /crates/q_cli/tests/cli_settings.rs: -------------------------------------------------------------------------------- 1 | mod common; 2 | 3 | use common::*; 4 | 5 | #[test] 6 | fn settings_get() -> Result<()> { 7 | cli() 8 | .args(["settings", "test-value"]) 9 | .assert() 10 | .code(predicate::in_iter([0, 1])); 11 | 12 | cli() 13 | .args(["settings", "test-value", "-f", "json"]) 14 | .assert() 15 | .stdout(is_json()) 16 | .success(); 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export function interpolateSettingBoolean( 9 | value: boolean | string, 10 | inverted?: boolean, 11 | ) { 12 | if (inverted) { 13 | return !value; 14 | } else { 15 | return value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/autocomplete/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Q Autocomplete 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.lintstagedrc.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | "*.{rs,toml}": () => [ 3 | "cargo +nightly fmt --check -- --color always", 4 | "cargo clippy --locked --color always -- -D warnings", 5 | ], 6 | "*.proto": () => [ 7 | "cd proto && buf lint && buf format --exit-code > /dev/null", 8 | ], 9 | "*.py": ["ruff format --check", "ruff check"], 10 | "*.{ts,js,tsx,jsx,mjs}": "prettier --check", 11 | "!(*test*)*": "typos --config .typos.toml", 12 | }; 13 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/saved_cursor/alacritty.recording: -------------------------------------------------------------------------------- 1 | [undeadleech@archhq saved_cursor]$ echo -e "\e7 \e(0 test \e8 xxx" 2 | 7 (0 test 8 xxx 3 | [undeadleech@archhq saved_cursor]$ echo -e "\e[?1049h \e(0 test \e[?1049l xxx" 4 | [?1049h (0 test [?1049l xxx 5 | [undeadleech@archhq saved_cursor]$ echo -e "\e7 \e(0 \e[?1049h test \e[?1049l \e8 xxx" 6 | 7 (0 [?1049h test [?1049l 8 xxx 7 | [undeadleech@archhq saved_cursor]$ exit 8 | exit 9 | -------------------------------------------------------------------------------- /packages/autocomplete-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Q Autocomplete 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/bg/terminal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/delete_chars_reset/alacritty.recording: -------------------------------------------------------------------------------- 1 | [?2004h[kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ printf "\e[31;1;7;4;9md\n" 2 | [?2004l d 3 | [?2004h[kchibisov@NightLord alacritty]$ printf "\e[31;1;7;4;9md\n"d\n"d\n"d\n"d\n"d\n"d\n"d\n"d\n"d\n"d\n"d\n"d\n" -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bashrc.pre.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile bashrc)" 10 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
15 | ); 16 | } 17 | 18 | export { Skeleton }; 19 | -------------------------------------------------------------------------------- /crates/fig_api_client/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod clients; 2 | pub(crate) mod consts; 3 | pub(crate) mod credentials; 4 | mod customization; 5 | mod endpoints; 6 | mod error; 7 | pub(crate) mod interceptor; 8 | pub mod model; 9 | pub mod profile; 10 | 11 | pub use clients::{ 12 | Client, 13 | StreamingClient, 14 | }; 15 | pub use customization::Customization; 16 | pub use endpoints::Endpoint; 17 | pub use error::Error; 18 | pub use profile::list_available_profiles; 19 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bashrc.post.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile bashrc)" 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_profile.post.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile profile)" 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_profile.pre.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile profile)" 10 | -------------------------------------------------------------------------------- /packages/dashboard-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Amazon Q Dashboard 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/components/modal.tsx: -------------------------------------------------------------------------------- 1 | export default function Modal({ children }: { children: React.ReactNode }) { 2 | return ( 3 |
4 |
5 | {children} 6 |
7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_login.pre.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile bash_login)" 10 | -------------------------------------------------------------------------------- /crates/fig_request/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod error; 2 | pub mod midway; 3 | mod reqwest_client; 4 | 5 | pub use error::Error; 6 | pub use reqwest; 7 | use reqwest::Client; 8 | pub use reqwest::{ 9 | Error as ReqwestError, 10 | Method, 11 | }; 12 | 13 | pub fn client() -> Option<&'static Client> { 14 | reqwest_client::reqwest_client() 15 | } 16 | 17 | pub fn client_no_redirect() -> Option<&'static Client> { 18 | reqwest_client::reqwest_client_no_redirect() 19 | } 20 | -------------------------------------------------------------------------------- /crates/fig_desktop/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.automation.apple-events 8 | 9 | com.apple.security.temporary-exception.shared-preference.read-write 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_login.post.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile bash_login)" 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_profile.post.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile bash_profile)" 10 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_profile.pre.bash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/fig_integrations/src/shell/mod.rs 3 | expression: integration.get_contents() 4 | --- 5 | _Q_LOCAL_BIN="$HOME/.local/bin" 6 | [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" 7 | unset _Q_LOCAL_BIN 8 | 9 | [ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile bash_profile)" 10 | -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/bg/hyper.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/bg/iterm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/dashboard-app/public/images/integrations/bg/vscode.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /crates/fig_ipc/test/data/alias.txt: -------------------------------------------------------------------------------- 1 | alias egrep='egrep --color=auto' 2 | alias fgrep='fgrep --color=auto' 3 | alias grep='grep --color=auto' 4 | alias l.='ls -d .* --color=auto' 5 | alias ll='ls -l --color=auto' 6 | alias ls='ls --color=auto' 7 | alias xzegrep='xzegrep --color=auto' 8 | alias xzfgrep='xzfgrep --color=auto' 9 | alias xzgrep='xzgrep --color=auto' 10 | alias zegrep='zegrep --color=auto' 11 | alias zfgrep='zfgrep --color=auto' 12 | alias zgrep='zgrep --color=auto' 13 | -------------------------------------------------------------------------------- /crates/zbus/src/abstractions/mod.rs: -------------------------------------------------------------------------------- 1 | /// This mod contains a bunch of abstractions. 2 | /// 3 | /// These abstractions allow us to make use of the appropriate API depending on which features are 4 | /// enabled. 5 | mod executor; 6 | pub use executor::*; 7 | mod async_drop; 8 | pub(crate) mod async_lock; 9 | pub use async_drop::*; 10 | pub(crate) mod file; 11 | 12 | // Not macOS-specific itself but only used on macOS. 13 | #[cfg(target_os = "macos")] 14 | pub(crate) mod process; 15 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/hooks/store/useStoreContext.ts: -------------------------------------------------------------------------------- 1 | import { StoreContext } from "@/context/zustand"; 2 | import { State } from "@/lib/store"; 3 | import { useContext } from "react"; 4 | import { useStore } from "zustand"; 5 | 6 | export function useStoreContext(selector: (state: State) => T): T { 7 | const store = useContext(StoreContext); 8 | if (!store) throw new Error("Missing StoreContext.Provider in the tree"); 9 | return useStore(store, selector); 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_cache_point.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_cache_point( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CachePoint, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("type").string(input.r#type.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /.github/workflows/typos.yml: -------------------------------------------------------------------------------- 1 | name: Typos 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | push: 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | typos: 13 | name: Spell Check 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 30 16 | steps: 17 | - name: Checkout Actions Repository 18 | uses: actions/checkout@v4 19 | - name: Check spelling 20 | uses: crate-ci/typos@master 21 | with: 22 | config: .typos.toml -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/zsh_tab_completion/alacritty.recording: -------------------------------------------------------------------------------- 1 | % jwilm@kurast.local ➜  ~/code/alacritty  [?1h=[?2004hccacat cc 2 | Cargo.lock Cargo.toml colors.pl* copypasta/ cat c -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_cache_point.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_cache_point( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CachePoint, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("type").string(input.r#type.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/fig_desktop/src/auth_watcher.rs: -------------------------------------------------------------------------------- 1 | pub fn spawn_auth_watcher() { 2 | tokio::spawn(async { 3 | loop { 4 | if fig_settings::state::get_bool_or("desktop.completedOnboarding", false) && !fig_auth::is_logged_in().await 5 | { 6 | let _ = fig_settings::state::set_value("desktop.auth-watcher.logged-in", false); 7 | } 8 | tokio::time::sleep(std::time::Duration::from_secs(60 * 60)).await; 9 | } 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_description.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_description( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDescription, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("href").string(input.href.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_cache_point.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_cache_point( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CachePoint, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("type").string(input.r#type.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/fig_desktop_api/src/error.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | pub type Result = std::result::Result; 4 | 5 | #[derive(Debug, Error)] 6 | pub enum Error { 7 | #[error("Failed to decode base64: {0}")] 8 | Base64Decode(#[from] base64::DecodeError), 9 | #[error("Failed to decode message: {0}")] 10 | ProtoDecode(#[from] fig_proto::prost::DecodeError), 11 | #[error("timeout")] 12 | Timeout, 13 | #[error("no message id")] 14 | NoMessageId, 15 | } 16 | -------------------------------------------------------------------------------- /packages/shell-parser/tests/fixtures/primaryExpressions/input.sh: -------------------------------------------------------------------------------- 1 | ### Case 1 2 | a "\${b}" 3 | 4 | ### Case 2 5 | a "'b'" 6 | 7 | ### Case 3 8 | a "\${b:+"c"}" 9 | 10 | ### Case 4 11 | a b"c" 12 | 13 | ### Case 5 14 | a '\${b}' 15 | 16 | ### Case 6 17 | a $'\${b}' 18 | 19 | ### Case 7 20 | a $'b''c'd$$$e\${f}"g" 21 | 22 | ### Case 8 23 | a $'b\\'c' 24 | 25 | ### Case 9 26 | a 'b\\'c' 27 | 28 | ### Case 10 29 | a "b$" 30 | 31 | ### Case 11 32 | a "$b" 33 | 34 | ### Case 12 35 | a "$(b "c" && d)" -------------------------------------------------------------------------------- /tests/fig-api/fig-api-mock/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fig-api-mock" 3 | authors.workspace = true 4 | edition.workspace = true 5 | homepage.workspace = true 6 | publish.workspace = true 7 | version.workspace = true 8 | license.workspace = true 9 | 10 | [dependencies] 11 | async-trait.workspace = true 12 | clap.workspace = true 13 | fig_desktop_api.workspace = true 14 | fig_os_shim.workspace = true 15 | fig_proto.workspace = true 16 | fig_settings.workspace = true 17 | tokio.workspace = true 18 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_code_description.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_description( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDescription, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("href").string(input.href.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_code_description.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_description( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDescription, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("href").string(input.href.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /extensions/gnome-extension/src/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuid": "amazon-q-for-cli-gnome-integration@aws.amazon.com", 3 | "name": "Amazon Q for CLI GNOME Integration", 4 | "url": "https://github.com/aws", 5 | "version": 1, 6 | "description": "Integrates Amazon Q for CLI with GNOME Shell for versions 45+", 7 | "gettext-domain": "amazon-q-for-cli-gnome-integration", 8 | "settings-schema": "org.gnome.shell.extensions.amazon-q-for-cli-gnome-integration", 9 | "shell-version": ["45", "46", "47"] 10 | } 11 | -------------------------------------------------------------------------------- /tests/figterm/configs/zsh-history-substring-search/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dotenv-base 2 | 3 | RUN sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 4 | # https://github.com/zsh-users/zsh-history-substring-search 5 | RUN git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search 6 | COPY zshrc ~/.zshrc 7 | RUN ~/install-fig 8 | 9 | ENTRYPOINT ["npm", "run", "test", "--"] 10 | CMD ["tests/zsh"] 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_git_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_git_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::GitState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.status { 7 | object.key("status").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_change_log_options.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_change_log_options( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ChangeLogOptions, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("granularity").string(input.granularity.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_git_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_git_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::GitState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.status { 7 | object.key("status").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_feature_dev_event.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_feature_dev_event( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::FeatureDevEvent, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("conversationId").string(input.conversation_id.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_input_schema.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_input_schema( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolInputSchema, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.json { 7 | object.key("json").document(var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_git_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_git_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::GitState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.status { 7 | object.key("status").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Issues 2 | 3 | We take all security reports seriously. When we receive such reports, we will investigate and subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential security issue in this project, please notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [AWS Security](mailto:aws-security@amazon.com). Please do not create a public GitHub issue in this project. 4 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_tool_input_schema.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_input_schema( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolInputSchema, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.json { 7 | object.key("json").document(var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/q_cli/src/util/region_check.rs: -------------------------------------------------------------------------------- 1 | use fig_util::system_info::in_cloudshell; 2 | 3 | const GOV_REGIONS: &[&str] = &["us-gov-east-1", "us-gov-west-1"]; 4 | 5 | pub fn region_check(capability: &'static str) -> eyre::Result<()> { 6 | let Ok(region) = std::env::var("AWS_REGION") else { 7 | return Ok(()); 8 | }; 9 | 10 | if in_cloudshell() && GOV_REGIONS.contains(®ion.as_str()) { 11 | eyre::bail!("AWS GovCloud ({region}) is not supported for {capability}."); 12 | } 13 | 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_fix_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_fix_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeFixUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("codeFixName").string(input.code_fix_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_tool_input_schema.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_input_schema( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolInputSchema, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.json { 7 | object.key("json").document(var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/inline_shell_completion/util.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Utility Functions # 4 | #--------------------------------------------------------------------# 5 | 6 | _{{CLI_BINARY_NAME_UNDERSCORE}}_autosuggest_escape_command() { 7 | setopt localoptions EXTENDED_GLOB 8 | 9 | # Escape special chars in the string (requires EXTENDED_GLOB) 10 | echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" 11 | } 12 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/fig_desktop/fuzz/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fig_desktop-fuzz" 3 | version = "0.0.0" 4 | publish = false 5 | edition = "2021" 6 | 7 | [package.metadata] 8 | cargo-fuzz = true 9 | 10 | [dependencies] 11 | libfuzzer-sys = "0.4" 12 | fig_ipc.workspace = true 13 | fig_util.workspace = true 14 | tempfile.workspace = true 15 | tokio.workspace = true 16 | fig_proto = { workspace = true, features = ["arbitrary"] } 17 | 18 | [[bin]] 19 | name = "local_ipc" 20 | path = "fuzz_targets/local_ipc.rs" 21 | test = false 22 | doc = false 23 | -------------------------------------------------------------------------------- /crates/figterm/src/cleanup.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | 3 | pub fn cleanup() -> Result<()> { 4 | // TODO: renable with ssh 5 | // if let Ok(parent) = std::env::var(Q_PARENT) { 6 | // if !parent.is_empty() { 7 | // trace!("Cleaning up parent file"); 8 | // let parent_path = directories::parent_socket_path(&parent)?; 9 | // if parent_path.exists() { 10 | // std::fs::remove_file(parent_path)?; 11 | // } 12 | // } 13 | // } 14 | 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/macos-utils/src/url.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use objc2_app_kit::NSWorkspace; 4 | use objc2_foundation::NSString; 5 | 6 | pub fn path_for_application(bundle_identifier: &str) -> Option { 7 | let bundle_identifier = NSString::from_str(bundle_identifier); 8 | let workspace = unsafe { NSWorkspace::sharedWorkspace() }; 9 | let url = unsafe { workspace.URLForApplicationWithBundleIdentifier(&bundle_identifier) }?; 10 | let path = unsafe { url.path() }?; 11 | Some(path.to_string().into()) 12 | } 13 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/src/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuid": "amazon-q-for-cli-legacy-gnome-integration@aws.amazon.com", 3 | "name": "Amazon Q for CLI GNOME Integration", 4 | "url": "https://github.com/aws", 5 | "version": 1, 6 | "description": "Integrates Amazon Q for CLI with GNOME Shell prior to v45", 7 | "gettext-domain": "amazon-q-for-cli-legacy-gnome-integration", 8 | "settings-schema": "org.gnome.shell.extensions.amazon-q-for-cli-legacy-gnome-integration", 9 | "shell-version": ["41", "42", "43", "44"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/dashboard-app/README.md: -------------------------------------------------------------------------------- 1 | # Dashboard 2 | 3 | This folder holds the React single-page app for the Amazon Q desktop UI. 4 | 5 |
6 | Dashboard UI 7 |
8 | 9 | ## Developing 10 | 11 | 1. Run `pnpm build` in the project root. 12 | 1. Run `npm run dev`. 13 | 1. Start the main Amazon Q Desktop according to the instructions in the [Amazon Q Desktop README](../../crates/fig_desktop/README.md). 14 | -------------------------------------------------------------------------------- /crates/macos-utils/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg(target_os = "macos")] 2 | // Mega yikes on this. 3 | #![allow(deprecated)] 4 | #![allow(unsafe_op_in_unsafe_fn)] 5 | 6 | pub mod accessibility; 7 | pub mod applications; 8 | pub mod bundle; 9 | pub mod caret_position; 10 | pub mod image; 11 | pub mod os; 12 | pub mod url; 13 | mod util; 14 | pub mod window_server; 15 | 16 | pub use util::{ 17 | NotificationCenter, 18 | get_user_info_from_notification, 19 | }; 20 | pub use window_server::{ 21 | WindowServer, 22 | WindowServerEvent, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/api-bindings/src/platform.ts: -------------------------------------------------------------------------------- 1 | import { GetPlatformInfoResponse } from "@aws/amazon-q-developer-cli-proto/fig"; 2 | import { sendGetPlatformInfoRequest } from "./requests.js"; 3 | import { 4 | AppBundleType, 5 | DesktopEnvironment, 6 | DisplayServerProtocol, 7 | Os, 8 | } from "@aws/amazon-q-developer-cli-proto/fig"; 9 | 10 | export { AppBundleType, DesktopEnvironment, DisplayServerProtocol, Os }; 11 | 12 | export function getPlatformInfo(): Promise { 13 | return sendGetPlatformInfoRequest({}); 14 | } 15 | -------------------------------------------------------------------------------- /packages/eslint-config/src/base.config.ts: -------------------------------------------------------------------------------- 1 | import tseslint from "typescript-eslint"; 2 | import type { TSESLint } from "@typescript-eslint/utils"; 3 | import { CONFIG } from "./common.js"; 4 | 5 | const config = ({ 6 | tsconfigPath, 7 | }: { 8 | tsconfigPath: string; 9 | }): TSESLint.FlatConfig.ConfigArray => 10 | tseslint.config(...CONFIG, { 11 | languageOptions: { 12 | parserOptions: { 13 | project: tsconfigPath, 14 | }, 15 | }, 16 | ignores: ["*.config.{js,ts}"], 17 | }); 18 | 19 | export default config; 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_analysis_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_analysis_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeAnalysisUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("codeScanName").string(input.code_scan_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_diff_metadata.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_diff_metadata( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDiffMetadata, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.code_diff_path { 7 | object.key("codeDiffPath").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/components/text/code.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | export function Code({ 4 | children, 5 | className, 6 | }: { 7 | children: React.ReactNode; 8 | className?: string; 9 | }) { 10 | return ( 11 | 17 | {children} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /tests/fig-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fig-api-tests", 3 | "version": "1.0.0", 4 | "private": true, 5 | "main": "index.js", 6 | "type": "module", 7 | "license": "MIT", 8 | "scripts": { 9 | "test": "vitest", 10 | "precommit": "exit 0" 11 | }, 12 | "devDependencies": { 13 | "@amzn/tsconfig": "workspace:^", 14 | "@amzn/types": "workspace:^", 15 | "@aws/amazon-q-developer-cli-api-bindings": "workspace:^", 16 | "@types/node": "^22.15.20", 17 | "typescript": "^5.8.3", 18 | "vitest": "^3.0.8" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_client_cache_config.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_client_cache_config( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ClientCacheConfig, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.use_client_caching_only { 7 | object.key("useClientCachingOnly").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /extensions/jetbrains/src/main/java/io/fig/jetbrains/terminal/TerminalStatus.java: -------------------------------------------------------------------------------- 1 | package io.fig.jetbrains.terminal; 2 | 3 | import com.intellij.ui.content.Content; 4 | 5 | public class TerminalStatus { 6 | 7 | private boolean focused; 8 | 9 | public TerminalStatus(Content content, boolean focused, int id) { 10 | this.focused = focused; 11 | } 12 | 13 | public boolean isFocused() { 14 | return this.focused; 15 | } 16 | 17 | public void setFocused(boolean focused) { 18 | this.focused = focused; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/data/help.ts: -------------------------------------------------------------------------------- 1 | import { CLI_BINARY_NAME, USER_MANUAL_URL } from "@/lib/constants"; 2 | 3 | const supportSteps = { 4 | steps: [ 5 | `Run \`${CLI_BINARY_NAME} doctor\` to automatically debug`, 6 | `Run \`${CLI_BINARY_NAME} issue\` to create an auto-populated issue`, 7 | ], 8 | links: [ 9 | // { 10 | // text: 'Troubleshooting guide', 11 | // url: '' 12 | // }, 13 | { 14 | text: "User manual", 15 | url: USER_MANUAL_URL, 16 | }, 17 | ], 18 | }; 19 | 20 | export default supportSteps; 21 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_profile_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_profile_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_profile::GetProfileInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.profile_arn { 7 | object.key("profileArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_user_settings.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_settings( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserSettings, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.has_consented_to_cross_region_calls { 7 | object.key("hasConsentedToCrossRegionCalls").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/macos-utils/accessibility-master/aq/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aq" 3 | version = "0.1.4" 4 | authors = ["Mack Straight "] 5 | edition = "2018" 6 | license = "MIT / Apache-2.0" 7 | homepage = "https://github.com/eiz/accessibility" 8 | repository = "https://github.com/eiz/accessibility" 9 | description = "Accessibility query" 10 | publish = false 11 | 12 | [target.'cfg(target_os = "macos")'.dependencies] 13 | accessibility = { path = "../accessibility", version = "0.1.6" } 14 | core-foundation.workspace = true 15 | structopt = "0.3" 16 | -------------------------------------------------------------------------------- /extensions/gnome-extension/schemas/org.gnome.shell.extensions.amazon-q-for-cli-gnome-integration.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | Show The Panel Icon 7 | Set to false to hide the panel icon. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/figterm2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "figterm2" 3 | authors.workspace = true 4 | edition.workspace = true 5 | homepage.workspace = true 6 | publish.workspace = true 7 | version.workspace = true 8 | license.workspace = true 9 | 10 | [dependencies] 11 | anyhow.workspace = true 12 | async-trait.workspace = true 13 | fig_ipc.workspace = true 14 | fig_proto.workspace = true 15 | fig_remote_ipc.workspace = true 16 | fig_util.workspace = true 17 | portable-pty.workspace = true 18 | tempfile.workspace = true 19 | tokio.workspace = true 20 | uuid.workspace = true 21 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_task_assist_planning_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_task_assist_planning_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::TaskAssistPlanningUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("conversationId").string(input.conversation_id.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/operation.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_types::request_id::RequestId; 3 | 4 | /// Types for the `ExportResultArchive` operation. 5 | pub mod export_result_archive; 6 | 7 | /// Types for the `GenerateAssistantResponse` operation. 8 | pub mod generate_assistant_response; 9 | 10 | /// Types for the `GenerateTaskAssistPlan` operation. 11 | pub mod generate_task_assist_plan; 12 | 13 | /// Types for the `SendMessage` operation. 14 | pub mod send_message; 15 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_client_cache_config.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_client_cache_config( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ClientCacheConfig, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.use_client_caching_only { 7 | object.key("useClientCachingOnly").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_delete_profile_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_profile_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_profile::DeleteProfileInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.profile_arn { 7 | object.key("profileArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_client_cache_config.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_client_cache_config( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ClientCacheConfig, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.use_client_caching_only { 7 | object.key("useClientCachingOnly").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/macos-utils/accessibility-master/accessibility-sys/src/value_constants.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_upper_case_globals)] 2 | 3 | pub const kAXHorizontalOrientationValue: &str = "AXHorizontalOrientation"; 4 | pub const kAXVerticalOrientationValue: &str = "AXVerticalOrientation"; 5 | pub const kAXUnknownOrientationValue: &str = "AXUnknownOrientation"; 6 | pub const kAXAscendingSortDirectionValue: &str = "AXAscendingSortDirection"; 7 | pub const kAXDescendingSortDirectionValue: &str = "AXDescendingSortDirection"; 8 | pub const kAXUnknownSortDirectionValue: &str = "AXUnknownSortDirection"; 9 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_user_settings.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_settings( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserSettings, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.has_consented_to_cross_region_calls { 7 | object.key("hasConsentedToCrossRegionCalls").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_user_settings.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_settings( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserSettings, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.has_consented_to_cross_region_calls { 7 | object.key("hasConsentedToCrossRegionCalls").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /packages/api-bindings/src/profile.ts: -------------------------------------------------------------------------------- 1 | import { ProfileSchema } from "@aws/amazon-q-developer-cli-proto/fig"; 2 | import { 3 | sendListAvailableProfilesRequest, 4 | sendSetProfileRequest, 5 | } from "./requests.js"; 6 | import { create } from "@bufbuild/protobuf"; 7 | 8 | export async function listAvailableProfiles() { 9 | return sendListAvailableProfilesRequest({}); 10 | } 11 | 12 | export async function setProfile(profileName: string, arn: string) { 13 | return sendSetProfileRequest({ 14 | profile: create(ProfileSchema, { arn, profileName }), 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/context/input.ts: -------------------------------------------------------------------------------- 1 | import { Dispatch, SetStateAction, createContext } from "react"; 2 | 3 | // Coordinates listeners for keyboard inputs to prevent having >1 input listening to keyboard events at a time. 4 | type ListenerProps = { 5 | listening: React.ReactNode | null; 6 | setListening: Dispatch>; 7 | }; 8 | 9 | const listenerObj: ListenerProps = { 10 | listening: null, 11 | setListening: () => {}, 12 | }; 13 | 14 | const ListenerContext = createContext(listenerObj); 15 | 16 | export default ListenerContext; 17 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "ui": "tui", 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "outputs": ["dist"] 8 | }, 9 | "lint": { 10 | "dependsOn": ["@amzn/eslint-config#build"], 11 | "cache": false 12 | }, 13 | "lint:fix": { 14 | "dependsOn": ["@amzn/eslint-config#build"], 15 | "cache": false 16 | }, 17 | "clean": { 18 | "cache": false 19 | }, 20 | "dev": { 21 | "cache": false, 22 | "persistent": true 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_get_customization_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_customization_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_customization::GetCustomizationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /packages/api-bindings/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-var */ 2 | 3 | declare global { 4 | var fig: 5 | | { 6 | constants: 7 | | { 8 | version?: string; 9 | os?: string; 10 | supportApiProto?: boolean; 11 | apiProtoUrl?: string; 12 | } 13 | | undefined; 14 | quiet: boolean | undefined; 15 | } 16 | | undefined; 17 | 18 | var ipc: 19 | | { 20 | postMessage?: (message: string) => void; 21 | } 22 | | undefined; 23 | } 24 | 25 | export {}; 26 | -------------------------------------------------------------------------------- /crates/zbus/src/abstractions/process.rs: -------------------------------------------------------------------------------- 1 | use std::ffi::OsStr; 2 | use std::io::Error; 3 | use std::process::Output; 4 | 5 | /// An asynchronous wrapper around running and getting command output 6 | pub async fn run(program: S, args: I) -> Result 7 | where 8 | I: IntoIterator, 9 | S: AsRef, 10 | { 11 | #[cfg(not(feature = "tokio"))] 12 | return async_process::Command::new(program).args(args).output().await; 13 | 14 | #[cfg(feature = "tokio")] 15 | return tokio::process::Command::new(program).args(args).output().await; 16 | } 17 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/lib/sort.ts: -------------------------------------------------------------------------------- 1 | export function alphaByTitle(a: { title: string }, b: { title: string }) { 2 | if (a.title > b.title) return 1; 3 | if (a.title < b.title) return -1; 4 | 5 | return 0; 6 | } 7 | 8 | export function alphaByTitlePrioritized( 9 | a: { title: string; priority?: number }, 10 | b: { title: string; priority?: number }, 11 | ) { 12 | const aPriority = a.priority ?? 0; 13 | const bPriority = b.priority ?? 0; 14 | if (aPriority < bPriority) return 1; 15 | if (aPriority > bPriority) return -1; 16 | 17 | return alphaByTitle(a, b); 18 | } 19 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/schemas/org.gnome.shell.extensions.amazon-q-for-cli-legacy-gnome-integration.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | Show The Panel Icon 7 | Set to false to hide the panel icon. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/shared/README.md: -------------------------------------------------------------------------------- 1 | # Shared utils 2 | 3 | ## ⚠️ This package SHOULDN'T contain states but only effects 4 | 5 | Why? This package is not published to a registry and when we require some of its exports in the other packages the required functions/constants are bundled in the requiring package. Bundling COPIES exports in the requiring packages (instead of `node_modules` that "reference" exports). For this reason if we create a shared state in this package and we consume it in two different packages that should work simultaneously it won't work correctly because two different states would be created. -------------------------------------------------------------------------------- /crates/aws-toolkit-telemetry-definitions/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aws-toolkit-telemetry-definitions" 3 | version = "0.1.0" 4 | edition = "2021" 5 | publish = false 6 | 7 | [lints] 8 | workspace = true 9 | 10 | [build-dependencies] 11 | convert_case = "0.8.0" 12 | prettyplease = "0.2.32" 13 | quote = "1.0.40" 14 | serde.workspace = true 15 | serde_json.workspace = true 16 | syn = "2.0.101" 17 | 18 | [dependencies] 19 | amzn-toolkit-telemetry-client = { path = "../amzn-toolkit-telemetry-client" } 20 | serde.workspace = true 21 | 22 | [dev-dependencies] 23 | serde_json.workspace = true 24 | -------------------------------------------------------------------------------- /extensions/vscode/ignoretest/suite/extension.test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | const assert = require("assert"); 3 | 4 | // You can import and use all API from the 'vscode' module 5 | // as well as import your extension to test it 6 | const vscode = require("vscode"); 7 | // const myExtension = require('../extension'); 8 | 9 | suite("Extension Test Suite", () => { 10 | vscode.window.showInformationMessage("Start all tests."); 11 | 12 | test("Sample test", () => { 13 | assert.equal(-1, [1, 2, 3].indexOf(5)); 14 | assert.equal(-1, [1, 2, 3].indexOf(0)); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_list_tags_for_resource_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_tags_for_resource_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.resource_arn { 7 | object.key("resourceArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /packages/shell-parser/tests/fixtures/multipleStatements/input.sh: -------------------------------------------------------------------------------- 1 | ### Case 1 2 | a && b 3 | 4 | ### Case 2 5 | a || b 6 | 7 | ### Case 3 8 | a | b 9 | 10 | ### Case 4 11 | a |& b 12 | 13 | ### Case 5 14 | (a; b) 15 | 16 | ### Case 6 17 | (a; b;) 18 | 19 | ### Case 7 20 | {a; b} 21 | 22 | ### Case 8 23 | {a; b;} 24 | 25 | ### Case 9 26 | a; b 27 | 28 | ### Case 10 29 | a & b 30 | 31 | ### Case 11 32 | a &; b 33 | 34 | ### Case 12 35 | a ; b; 36 | 37 | ### Case 13 38 | a && b || c 39 | 40 | ### Case 14 41 | a && b | c 42 | 43 | ### Case 15 44 | a | b && c 45 | 46 | ### Case 16 47 | (a) | b && c -------------------------------------------------------------------------------- /tests/figterm/src/settings.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import os from 'os'; 3 | 4 | const SETTINGS_PATH = `${os.homedir()}/.fig/settings.json`; 5 | 6 | const get = () => JSON.parse(String(fs.readFileSync(SETTINGS_PATH))); 7 | const getValue = (key: string) => get()[key]; 8 | 9 | const set = (params: Record, overwrite = false) => { 10 | const newSettings = overwrite ? params : { ...get(), ...params }; 11 | fs.writeFileSync(SETTINGS_PATH, JSON.stringify(newSettings, null, 4)); 12 | }; 13 | 14 | const reset = () => set({}, true); 15 | 16 | export default { get, getValue, set, reset }; 17 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/protocol_serde/shape_userdata.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_userdata( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Userdata, 5 | ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.email { 7 | object.key("Email").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.comment { 10 | object.key("Comment").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/fig_integrations/src/shell/inline_shell_completion/strategies/inline.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # InlineShell Suggestion Strategy # 4 | #--------------------------------------------------------------------# 5 | # Suggests the inline_shell_completion command. 6 | # 7 | 8 | _{{CLI_BINARY_NAME_UNDERSCORE}}_autosuggest_strategy_inline_shell_completion() { 9 | typeset -g suggestion="$(command -v {{CLI_BINARY_NAME}} >/dev/null 2>&1 && {{CLI_BINARY_NAME}} _ inline-shell-completion --buffer "${BUFFER}")" 10 | } 11 | -------------------------------------------------------------------------------- /crates/macos-utils/accessibility-master/accessibility-sys/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg(target_os = "macos")] 2 | 3 | mod action_constants; 4 | mod attribute_constants; 5 | mod error; 6 | mod notification_constants; 7 | mod role_constants; 8 | mod text_attributed_string; 9 | mod ui_element; 10 | mod value; 11 | mod value_constants; 12 | 13 | pub use action_constants::*; 14 | pub use attribute_constants::*; 15 | pub use error::*; 16 | pub use notification_constants::*; 17 | pub use role_constants::*; 18 | pub use text_attributed_string::*; 19 | pub use ui_element::*; 20 | pub use value::*; 21 | pub use value_constants::*; 22 | -------------------------------------------------------------------------------- /extensions/gnome-extension/resources/icons/scalable/actions/fig-disconnected-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/dashboard-app/src/hooks/useCountdown.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export function useCountdown(seconds: number, onEnd: () => unknown) { 4 | const [remaining, setRemaining] = React.useState(seconds); 5 | 6 | React.useEffect(() => { 7 | function tick() { 8 | setRemaining(remaining - 1); 9 | } 10 | 11 | const countdown = setInterval(tick, 1000); 12 | 13 | if (remaining < 0) { 14 | clearInterval(countdown); 15 | onEnd(); 16 | } 17 | 18 | return () => clearInterval(countdown); 19 | }, [remaining, onEnd]); 20 | 21 | return remaining; 22 | } 23 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/decaln_reset/alacritty.recording: -------------------------------------------------------------------------------- 1 | [?2004h[kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ resetecho -e "\033#8"printf "\e[41;1;4;9mTEST asd\n"[1@3[1@2[1@1[1@;[1@1[1@; 2 | [?2004l TEST asd 3 | [?2004h[kchibisov@NightLord alacritty]$ printf "\e[31;1;41;1;4;9mTEST asd\n" resetecho -e "\033#8" 4 | [?2004l #8 5 | [?2004h[kchibisov@NightLord alacritty]$ -------------------------------------------------------------------------------- /crates/q_cli/tests/common/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(unused_imports, dead_code)] 2 | 3 | use std::process::Command; 4 | 5 | pub use assert_cmd::prelude::*; 6 | use fig_util::CLI_CRATE_NAME; 7 | use predicates::function::FnPredicate; 8 | pub use predicates::prelude::*; 9 | 10 | pub type Result> = std::result::Result; 11 | 12 | pub fn cli() -> Command { 13 | Command::cargo_bin("q_cli").unwrap() 14 | } 15 | 16 | pub fn is_json() -> FnPredicate bool, str> { 17 | predicates::function::function(|s: &str| serde_json::from_str::(s).is_ok()) 18 | } 19 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_dimension.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_dimension( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Dimension, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.name { 7 | object.key("name").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_external_identity_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_external_identity_source( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ExternalIdentitySource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("issuerUrl").string(input.issuer_url.as_str()); 8 | } 9 | { 10 | object.key("clientId").string(input.client_id.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/protocol_serde/shape_metadata_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_metadata_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::MetadataEntry, 5 | ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.key { 7 | object.key("Key").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("Value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /extensions/gnome-legacy-extension/resources/icons/scalable/actions/fig-disconnected-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_followup_prompt.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_followup_prompt( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::FollowupPrompt, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("content").string(input.content.as_str()); 8 | } 9 | if let Some(var_1) = &input.user_intent { 10 | object.key("userIntent").string(var_1.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /extensions/vscode/README.md: -------------------------------------------------------------------------------- 1 | # Amazon Q for command line 2 | 3 | This is the Amazon Q for command line IDE extension. It only supports completions in your IDEs' terminal emulator. 4 | 5 | If you would like completions in your editor, please download the [AWS Toolkit extension](https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-toolkit-vscode) and set up Amazon Q. 6 | 7 | For support, please see [github.com/aws/q-command-line-discussions](https://github.com/aws/q-command-line-discussions). 8 | 9 | ![CLI Compleations Demo](https://raw.githubusercontent.com/aws/q-command-line-discussions/main/assets/cli-completions.gif) -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_sso_identity_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_sso_identity_source( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::SsoIdentitySource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("instanceArn").string(input.instance_arn.as_str()); 8 | } 9 | if let Some(var_1) = &input.sso_region { 10 | object.key("ssoRegion").string(var_1.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_create_task_assist_conversation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_create_task_assist_conversation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::create_task_assist_conversation::CreateTaskAssistConversationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.profile_arn { 7 | object.key("profileArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_delete_customization_permissions_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_customization_permissions_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_customization_permissions::DeleteCustomizationPermissionsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/erase_chars_reset/alacritty.recording: -------------------------------------------------------------------------------- 1 | [?2004h[kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ echo -e "hello world" "\033[10;D" "\033[4;X" printf "\e[31;1;4;9mTEST asd\n" 2 | [?2004l TEST asd 3 | [?2004h[kchibisov@NightLord alacritty]$ printf "\e[31;1;4;9mTEST asd\n"echo -e "hello world" "\033[10;D" "\033[4;X" 4 | [?2004l hello world   5 | [?2004h[kchibisov@NightLord alacritty]$ -------------------------------------------------------------------------------- /crates/alacritty_terminal/tests/ref/insert_blank_reset/alacritty.recording: -------------------------------------------------------------------------------- 1 | [?2004h[kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ [kchibisov@NightLord alacritty]$ resetprintf "\e[41;1;4;9mTEST asd\n"resetprintf "\e[41;1;4;9mTEST asd\n"[1@3 2 | [?2004l TEST asd 3 | [?2004h[kchibisov@NightLord alacritty]$ printf "\e[31;1;4;9mTEST asd\n"resetprintf "\e[41;1;4;9mTEST asd\n"resetecho -e "\033[100;@" 4 | [?2004l [100;@ 5 | [?2004h[kchibisov@NightLord alacritty]$ -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_use.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_use( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolUse, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("toolUseId").string(input.tool_use_id.as_str()); 8 | } 9 | { 10 | object.key("name").string(input.name.as_str()); 11 | } 12 | { 13 | object.key("input").document(&input.input); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /extensions/gnome-extension/resources/resources.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui/adw/Preferences.ui 5 | ui/gtk3/Preferences.ui 6 | 7 | icons/scalable/actions/q-connected.svg 8 | icons/scalable/actions/q-disconnected.svg 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tsconfig/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "target": "es2020", 5 | "module": "nodenext", 6 | "moduleResolution": "nodenext", 7 | "lib": ["ESNext"], 8 | 9 | "declaration": true, 10 | "stripInternal": true, 11 | "sourceMap": true, 12 | "newLine": "lf", 13 | 14 | "experimentalDecorators": true, 15 | "esModuleInterop": true, 16 | 17 | "strict": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true, 20 | "skipLibCheck": true 21 | }, 22 | "exclude": ["node_modules", "build", "dist"] 23 | } 24 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_environment_variable.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_environment_variable( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::EnvironmentVariable, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.key { 7 | object.key("key").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/fig_aws_common/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fig_aws_common" 3 | authors.workspace = true 4 | edition.workspace = true 5 | homepage.workspace = true 6 | publish.workspace = true 7 | version.workspace = true 8 | license.workspace = true 9 | 10 | [dependencies] 11 | aws-runtime = "1.4.4" 12 | aws-smithy-runtime-api.workspace = true 13 | aws-smithy-types.workspace = true 14 | aws-types.workspace = true 15 | fig_request.workspace = true 16 | http.workspace = true 17 | tracing.workspace = true 18 | 19 | [dev-dependencies] 20 | aws-smithy-runtime = { version = "1.6.1", features = ["client", "test-util"] } 21 | 22 | [lints] 23 | workspace = true 24 | --------------------------------------------------------------------------------