opencami 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +60 -0
  2. package/dist/client/assets/CSPContext-BBLAL_m_.js +1 -0
  3. package/dist/client/assets/DirectionContext-DXnZc0zz.js +1 -0
  4. package/dist/client/assets/_sessionKey-BidmO1-D.js +100 -0
  5. package/dist/client/assets/agents-CtZs_u1j.js +2 -0
  6. package/dist/client/assets/agents-screen-Basce5qo.js +1 -0
  7. package/dist/client/assets/bots-C_dWjy3z.js +2 -0
  8. package/dist/client/assets/bots-screen-n_xhYOEE.js +1 -0
  9. package/dist/client/assets/button-BaHefIXU.js +1 -0
  10. package/dist/client/assets/c-BIGW1oBm.js +1 -0
  11. package/dist/client/assets/{connect-D3baVDFL.js → connect-DHr3hhUR.js} +1 -1
  12. package/dist/client/assets/core-BrHBc0Zp.js +12 -0
  13. package/dist/client/assets/cpp-B-lmv-kZ.js +1 -0
  14. package/dist/client/assets/csharp-K5feNrxe.js +1 -0
  15. package/dist/client/assets/css-DPfMkruS.js +1 -0
  16. package/dist/client/assets/diff-D97Zzqfu.js +1 -0
  17. package/dist/client/assets/dockerfile-BcOcwvcX.js +1 -0
  18. package/dist/client/assets/engine-javascript-PwbX1GN8.js +141 -0
  19. package/dist/client/assets/file-explorer-screen-8t6M4Xco.js +1 -0
  20. package/dist/client/assets/files-BdlpK3Cy.js +2 -0
  21. package/dist/client/assets/go-Dn2_MT6a.js +1 -0
  22. package/dist/client/assets/graphql-ChdNCCLP.js +1 -0
  23. package/dist/client/assets/html-GMplVEZG.js +1 -0
  24. package/dist/client/assets/index-B2iG4EM1.js +3 -0
  25. package/dist/client/assets/{index-ByIsZcHh.js → index-GTR-Xzl2.js} +1 -1
  26. package/dist/client/assets/index-T4TOjvD0.js +1 -0
  27. package/dist/client/assets/java-CylS5w8V.js +1 -0
  28. package/dist/client/assets/javascript-wDzz0qaB.js +1 -0
  29. package/dist/client/assets/json-Cp-IABpG.js +1 -0
  30. package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
  31. package/dist/client/assets/keyboard-shortcuts-dialog-CcKSlK52.js +1 -0
  32. package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
  33. package/dist/client/assets/{main-CkIF0soY.js → main-mIHr_ble.js} +129 -17
  34. package/dist/client/assets/markdown-Cvjx9yec.js +1 -0
  35. package/dist/client/assets/{opencami-logo-CIxSO1oo.js → opencami-logo-CRIdKbbZ.js} +1 -1
  36. package/dist/client/assets/php-CDn_0X-4.js +1 -0
  37. package/dist/client/assets/python-B6aJPvgy.js +1 -0
  38. package/dist/client/assets/react-Cfq4ot0g.js +1 -0
  39. package/dist/client/assets/regexp-CDVJQ6XC.js +1 -0
  40. package/dist/client/assets/ruby-FDmvQDUv.js +1 -0
  41. package/dist/client/assets/rust-B1yitclQ.js +1 -0
  42. package/dist/client/assets/search-dialog-D19x_xaG.js +1 -0
  43. package/dist/client/assets/session-export-dialog-DRlJwhMa.js +1 -0
  44. package/dist/client/assets/settings-dialog-BA5FjiyP.js +1 -0
  45. package/dist/client/assets/shell-DfDnw5Jg.js +1 -0
  46. package/dist/client/assets/skills-lmNPZksG.js +2 -0
  47. package/dist/client/assets/skills-panel-Cv-N_MDk.js +5 -0
  48. package/dist/client/assets/sql-BLtJtn59.js +1 -0
  49. package/dist/client/assets/styles-JgjN_ZCd.css +1 -0
  50. package/dist/client/assets/swift-Dg5xB15N.js +1 -0
  51. package/dist/client/assets/switch-Bh9tVOYh.js +1 -0
  52. package/dist/client/assets/tabs-BfaEc9zS.js +1 -0
  53. package/dist/client/assets/toml-vGWfd6FD.js +1 -0
  54. package/dist/client/assets/tooltip-w9D-e_R-.js +1 -0
  55. package/dist/client/assets/tsx-COt5Ahok.js +1 -0
  56. package/dist/client/assets/typescript-BPQ3VLAy.js +1 -0
  57. package/dist/client/assets/use-file-explorer-state-CLaDuI9X.js +12 -0
  58. package/dist/client/assets/useButton-DsMdJPGn.js +1 -0
  59. package/dist/client/assets/useCompositeItem-CaYygSfB.js +1 -0
  60. package/dist/client/assets/{useControlled-Y306krcC.js → useControlled-wOKVgKF4.js} +1 -1
  61. package/dist/client/assets/{useMutation-0WgW4xQJ.js → useMutation-fJnleJAb.js} +1 -1
  62. package/dist/client/assets/visuallyHidden-CqGRL_Oq.js +9 -0
  63. package/dist/client/assets/vitesse-dark-D0r3Knsf.js +1 -0
  64. package/dist/client/assets/vitesse-light-CVO1_9PV.js +1 -0
  65. package/dist/client/assets/xml-sdJ4AIDG.js +1 -0
  66. package/dist/client/assets/yaml-Buea-lGh.js +1 -0
  67. package/dist/server/assets/{_sessionKey-BhFH4uWY.js → _sessionKey-B5UHBd2U.js} +190 -54
  68. package/dist/server/assets/_tanstack-start-manifest_v-D11xMFUx.js +4 -0
  69. package/dist/server/assets/{agents-Dz_i76VW.js → agents-CmQ4vvXm.js} +1 -1
  70. package/dist/server/assets/{agents-screen-CqQPJndp.js → agents-screen-bmrIyFbk.js} +43 -35
  71. package/dist/server/assets/{bots-6ryCIgKh.js → bots-Byt6jv0a.js} +1 -1
  72. package/dist/server/assets/bots-screen-C2TGFv42.js +474 -0
  73. package/dist/server/assets/{button-DtQ3rV1m.js → button-CwY2OHFj.js} +2 -2
  74. package/dist/server/assets/{connect-B8jpGQGK.js → connect-CbgijWz4.js} +2 -35
  75. package/dist/server/assets/{file-explorer-screen-DCfS_Ajx.js → file-explorer-screen-CVlFiAFu.js} +36 -36
  76. package/dist/server/assets/{files-D2GIrPF4.js → files-BIEcSPGp.js} +1 -1
  77. package/dist/server/assets/{index-B2JHn34C.js → index--_jH_0mX.js} +2 -1
  78. package/dist/server/assets/{index-BNSsDaLb.js → index-Dl2BOKP7.js} +116 -82
  79. package/dist/server/assets/{keyboard-shortcuts-dialog-CqIm8aYF.js → keyboard-shortcuts-dialog-CsNP85q8.js} +2 -2
  80. package/dist/server/assets/{router-Dme7USeO.js → router-DJA7GtMo.js} +356 -64
  81. package/dist/server/assets/{search-dialog-DG0D9KRN.js → search-dialog-C2a3OYm_.js} +64 -83
  82. package/dist/server/assets/{session-export-dialog-DLPZVlQV.js → session-export-dialog-CwclV0Aj.js} +2 -2
  83. package/dist/server/assets/{settings-dialog-BaGT4e5l.js → settings-dialog-CHVzrou9.js} +390 -128
  84. package/dist/server/assets/skills-Cy8xclXY.js +11 -0
  85. package/dist/server/assets/skills-panel-BnRNb7u9.js +762 -0
  86. package/dist/server/assets/{switch-DnX0MjGS.js → switch-BbkUeVDV.js} +1 -1
  87. package/dist/server/assets/tabs-DDFZob0m.js +67 -0
  88. package/dist/server/assets/{tooltip-gbV6rEVv.js → tooltip-DgsSPocE.js} +1 -1
  89. package/dist/server/assets/{use-file-explorer-state-DfAKF2gZ.js → use-file-explorer-state-Il1LlBAe.js} +1 -1
  90. package/dist/server/server.js +2 -2
  91. package/package.json +7 -2
  92. package/dist/client/assets/_sessionKey-DB95zj1L.js +0 -97
  93. package/dist/client/assets/agents-LFrWe-HX.js +0 -2
  94. package/dist/client/assets/agents-screen-CEBBk1yO.js +0 -1
  95. package/dist/client/assets/bots-CxDwf_WK.js +0 -2
  96. package/dist/client/assets/bots-screen-D6qma1wK.js +0 -1
  97. package/dist/client/assets/button-Il3CHIzX.js +0 -1
  98. package/dist/client/assets/file-explorer-screen-rtV6n-5_.js +0 -1
  99. package/dist/client/assets/files-DMemuq9D.js +0 -2
  100. package/dist/client/assets/index-CVV4XiZo.js +0 -153
  101. package/dist/client/assets/keyboard-shortcuts-dialog-DXC0YHoy.js +0 -1
  102. package/dist/client/assets/react-BhVdgA5r.js +0 -1
  103. package/dist/client/assets/search-dialog-I1jJplIh.js +0 -1
  104. package/dist/client/assets/session-export-dialog-CH5unryw.js +0 -1
  105. package/dist/client/assets/settings-dialog-B8v-GVJ8.js +0 -1
  106. package/dist/client/assets/styles-BaTVzdPa.css +0 -1
  107. package/dist/client/assets/switch-sQnv1YsK.js +0 -1
  108. package/dist/client/assets/tooltip-j_viC_EE.js +0 -1
  109. package/dist/client/assets/use-file-explorer-state-BUH-u7Jv.js +0 -12
  110. package/dist/client/assets/useButton-9VAzplAB.js +0 -9
  111. package/dist/server/assets/_tanstack-start-manifest_v-BaIrL1VQ.js +0 -4
  112. package/dist/server/assets/bots-screen-DS_ZF9Ec.js +0 -417
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse(`{"displayName":"Rust","name":"rust","patterns":[{"begin":"(<)(\\\\[)","beginCaptures":{"1":{"name":"punctuation.brackets.angle.rust"},"2":{"name":"punctuation.brackets.square.rust"}},"end":">","endCaptures":{"0":{"name":"punctuation.brackets.angle.rust"}},"patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#gtypes"},{"include":"#lvariables"},{"include":"#lifetimes"},{"include":"#punctuation"},{"include":"#types"}]},{"captures":{"1":{"name":"keyword.operator.macro.dollar.rust"},"3":{"name":"keyword.other.crate.rust"},"4":{"name":"entity.name.type.metavariable.rust"},"6":{"name":"keyword.operator.key-value.rust"},"7":{"name":"variable.other.metavariable.specifier.rust"}},"match":"(\\\\$)((crate)|([A-Z]\\\\w*))(\\\\s*(:)\\\\s*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\\\\b)?","name":"meta.macro.metavariable.type.rust","patterns":[{"include":"#keywords"}]},{"captures":{"1":{"name":"keyword.operator.macro.dollar.rust"},"2":{"name":"variable.other.metavariable.name.rust"},"4":{"name":"keyword.operator.key-value.rust"},"5":{"name":"variable.other.metavariable.specifier.rust"}},"match":"(\\\\$)([a-z]\\\\w*)(\\\\s*(:)\\\\s*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\\\\b)?","name":"meta.macro.metavariable.rust","patterns":[{"include":"#keywords"}]},{"captures":{"1":{"name":"entity.name.function.macro.rules.rust"},"3":{"name":"entity.name.function.macro.rust"},"4":{"name":"entity.name.type.macro.rust"},"5":{"name":"punctuation.brackets.curly.rust"}},"match":"\\\\b(macro_rules!)\\\\s+(([0-9_a-z]+)|([A-Z][0-9_a-z]*))\\\\s+(\\\\{)","name":"meta.macro.rules.rust"},{"captures":{"1":{"name":"storage.type.rust"},"2":{"name":"entity.name.module.rust"}},"match":"(mod)\\\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][0-9A-Z_a-z]*)"},{"begin":"\\\\b(extern)\\\\s+(crate)","beginCaptures":{"1":{"name":"storage.type.rust"},"2":{"name":"keyword.other.crate.rust"}},"end":";","endCaptures":{"0":{"name":"punctuation.semi.rust"}},"name":"meta.import.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#punctuation"}]},{"begin":"\\\\b(use)\\\\s","beginCaptures":{"1":{"name":"keyword.other.rust"}},"end":";","endCaptures":{"0":{"name":"punctuation.semi.rust"}},"name":"meta.use.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#types"},{"include":"#lvariables"}]},{"include":"#block-comments"},{"include":"#comments"},{"include":"#attributes"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#types"},{"include":"#keywords"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#variables"}],"repository":{"attributes":{"begin":"(#)(!?)(\\\\[)","beginCaptures":{"1":{"name":"punctuation.definition.attribute.rust"},"3":{"name":"punctuation.brackets.attribute.rust"}},"end":"]","endCaptures":{"0":{"name":"punctuation.brackets.attribute.rust"}},"name":"meta.attribute.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#lifetimes"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#gtypes"},{"include":"#types"}]},"block-comments":{"patterns":[{"match":"/\\\\*\\\\*/","name":"comment.block.rust"},{"begin":"/\\\\*\\\\*","end":"\\\\*/","name":"comment.block.documentation.rust","patterns":[{"include":"#block-comments"}]},{"begin":"/\\\\*(?!\\\\*)","end":"\\\\*/","name":"comment.block.rust","patterns":[{"include":"#block-comments"}]}]},"comments":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.rust"}},"match":"(///).*$","name":"comment.line.documentation.rust"},{"captures":{"1":{"name":"punctuation.definition.comment.rust"}},"match":"(//).*$","name":"comment.line.double-slash.rust"}]},"constants":{"patterns":[{"match":"\\\\b[A-Z]{2}[0-9A-Z_]*\\\\b","name":"constant.other.caps.rust"},{"captures":{"1":{"name":"storage.type.rust"},"2":{"name":"constant.other.caps.rust"}},"match":"\\\\b(const)\\\\s+([A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"punctuation.separator.dot.decimal.rust"},"2":{"name":"keyword.operator.exponent.rust"},"3":{"name":"keyword.operator.exponent.sign.rust"},"4":{"name":"constant.numeric.decimal.exponent.mantissa.rust"},"5":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b\\\\d[_\\\\d]*(\\\\.?)[_\\\\d]*(?:([Ee])([-+]?)([_\\\\d]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.decimal.rust"},{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b0x[A-F_a-f\\\\d]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.hex.rust"},{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.oct.rust"},{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.bin.rust"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.bool.rust"}]},"escapes":{"captures":{"1":{"name":"constant.character.escape.backslash.rust"},"2":{"name":"constant.character.escape.bit.rust"},"3":{"name":"constant.character.escape.unicode.rust"},"4":{"name":"constant.character.escape.unicode.punctuation.rust"},"5":{"name":"constant.character.escape.unicode.punctuation.rust"}},"match":"(\\\\\\\\)(?:(x[0-7][A-Fa-f\\\\d])|(u(\\\\{)[A-Fa-f\\\\d]{4,6}(}))|.)","name":"constant.character.escape.rust"},"functions":{"patterns":[{"captures":{"1":{"name":"keyword.other.rust"},"2":{"name":"punctuation.brackets.round.rust"}},"match":"\\\\b(pub)(\\\\()"},{"begin":"\\\\b(fn)\\\\s+((?:r#(?!crate|[Ss]elf|super))?[0-9A-Z_a-z]+)((\\\\()|(<))","beginCaptures":{"1":{"name":"keyword.other.fn.rust"},"2":{"name":"entity.name.function.rust"},"4":{"name":"punctuation.brackets.round.rust"},"5":{"name":"punctuation.brackets.angle.rust"}},"end":"(\\\\{)|(;)","endCaptures":{"1":{"name":"punctuation.brackets.curly.rust"},"2":{"name":"punctuation.semi.rust"}},"name":"meta.function.definition.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#types"},{"include":"#variables"}]},{"begin":"((?:r#(?!crate|[Ss]elf|super))?[0-9A-Z_a-z]+)(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.rust"},"2":{"name":"punctuation.brackets.round.rust"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.brackets.round.rust"}},"name":"meta.function.call.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#attributes"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#types"},{"include":"#variables"}]},{"begin":"((?:r#(?!crate|[Ss]elf|super))?[0-9A-Z_a-z]+)(?=::<.*>\\\\()","beginCaptures":{"1":{"name":"entity.name.function.rust"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.brackets.round.rust"}},"name":"meta.function.call.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#attributes"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#types"},{"include":"#variables"}]}]},"gtypes":{"patterns":[{"match":"\\\\b(Some|None)\\\\b","name":"entity.name.type.option.rust"},{"match":"\\\\b(Ok|Err)\\\\b","name":"entity.name.type.result.rust"}]},"interpolations":{"captures":{"1":{"name":"punctuation.definition.interpolation.rust"},"2":{"name":"punctuation.definition.interpolation.rust"}},"match":"(\\\\{)[^\\"{}]*(})","name":"meta.interpolation.rust"},"keywords":{"patterns":[{"match":"\\\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\\\b","name":"keyword.control.rust"},{"match":"\\\\b(extern|let|macro|mod)\\\\b","name":"keyword.other.rust storage.type.rust"},{"match":"\\\\b(const)\\\\b","name":"storage.modifier.rust"},{"match":"\\\\b(type)\\\\b","name":"keyword.declaration.type.rust storage.type.rust"},{"match":"\\\\b(enum)\\\\b","name":"keyword.declaration.enum.rust storage.type.rust"},{"match":"\\\\b(trait)\\\\b","name":"keyword.declaration.trait.rust storage.type.rust"},{"match":"\\\\b(struct)\\\\b","name":"keyword.declaration.struct.rust storage.type.rust"},{"match":"\\\\b(abstract|static)\\\\b","name":"storage.modifier.rust"},{"match":"\\\\b(as|async|become|box|dyn|move|final|gen|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\\\b","name":"keyword.other.rust"},{"match":"\\\\bfn\\\\b","name":"keyword.other.fn.rust"},{"match":"\\\\bcrate\\\\b","name":"keyword.other.crate.rust"},{"match":"\\\\bmut\\\\b","name":"storage.modifier.mut.rust"},{"match":"([\\\\^|]|\\\\|\\\\||&&|<<|>>|!)(?!=)","name":"keyword.operator.logical.rust"},{"match":"&(?![\\\\&=])","name":"keyword.operator.borrow.and.rust"},{"match":"((?:[-%\\\\&*+/^|]|<<|>>)=)","name":"keyword.operator.assignment.rust"},{"match":"(?<![<>])=(?![=>])","name":"keyword.operator.assignment.equal.rust"},{"match":"(=(=)?(?!>)|!=|<=|(?<!=)>=)","name":"keyword.operator.comparison.rust"},{"match":"(([%+]|(\\\\*(?!\\\\w)))(?!=))|(-(?!>))|(/(?!/))","name":"keyword.operator.math.rust"},{"captures":{"1":{"name":"punctuation.brackets.round.rust"},"2":{"name":"punctuation.brackets.square.rust"},"3":{"name":"punctuation.brackets.curly.rust"},"4":{"name":"keyword.operator.comparison.rust"},"5":{"name":"punctuation.brackets.round.rust"},"6":{"name":"punctuation.brackets.square.rust"},"7":{"name":"punctuation.brackets.curly.rust"}},"match":"(?:\\\\b|(?:(\\\\))|(])|(})))[\\\\t ]+([<>])[\\\\t ]+(?:\\\\b|(?:(\\\\()|(\\\\[)|(\\\\{)))"},{"match":"::","name":"keyword.operator.namespace.rust"},{"captures":{"1":{"name":"keyword.operator.dereference.rust"}},"match":"(\\\\*)(?=\\\\w+)"},{"match":"@","name":"keyword.operator.subpattern.rust"},{"match":"\\\\.(?!\\\\.)","name":"keyword.operator.access.dot.rust"},{"match":"\\\\.{2}([.=])?","name":"keyword.operator.range.rust"},{"match":":(?!:)","name":"keyword.operator.key-value.rust"},{"match":"->|<-","name":"keyword.operator.arrow.skinny.rust"},{"match":"=>","name":"keyword.operator.arrow.fat.rust"},{"match":"\\\\$","name":"keyword.operator.macro.dollar.rust"},{"match":"\\\\?","name":"keyword.operator.question.rust"}]},"lifetimes":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.lifetime.rust"},"2":{"name":"entity.name.type.lifetime.rust"}},"match":"(')([A-Z_a-z][0-9A-Z_a-z]*)(?!')\\\\b"},{"captures":{"1":{"name":"keyword.operator.borrow.rust"},"2":{"name":"punctuation.definition.lifetime.rust"},"3":{"name":"entity.name.type.lifetime.rust"}},"match":"(&)(')([A-Z_a-z][0-9A-Z_a-z]*)(?!')\\\\b"}]},"lvariables":{"patterns":[{"match":"\\\\b[Ss]elf\\\\b","name":"variable.language.self.rust"},{"match":"\\\\bsuper\\\\b","name":"variable.language.super.rust"}]},"macros":{"patterns":[{"captures":{"2":{"name":"entity.name.function.macro.rust"},"3":{"name":"entity.name.type.macro.rust"}},"match":"(([_a-z][0-9A-Z_a-z]*!)|([A-Z_][0-9A-Z_a-z]*!))","name":"meta.macro.rust"}]},"namespaces":{"patterns":[{"captures":{"1":{"name":"entity.name.namespace.rust"},"2":{"name":"keyword.operator.namespace.rust"}},"match":"(?<![0-9A-Z_a-z])([0-9A-Z_a-z]+)((?<!s(?:uper|elf))::)"}]},"punctuation":{"patterns":[{"match":",","name":"punctuation.comma.rust"},{"match":"[{}]","name":"punctuation.brackets.curly.rust"},{"match":"[()]","name":"punctuation.brackets.round.rust"},{"match":";","name":"punctuation.semi.rust"},{"match":"[]\\\\[]","name":"punctuation.brackets.square.rust"},{"match":"(?<!=)[<>]","name":"punctuation.brackets.angle.rust"}]},"strings":{"patterns":[{"begin":"(b?)(\\")","beginCaptures":{"1":{"name":"string.quoted.byte.raw.rust"},"2":{"name":"punctuation.definition.string.rust"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.rust"}},"name":"string.quoted.double.rust","patterns":[{"include":"#escapes"},{"include":"#interpolations"}]},{"begin":"(b?r)(#*)(\\")","beginCaptures":{"1":{"name":"string.quoted.byte.raw.rust"},"2":{"name":"punctuation.definition.string.raw.rust"},"3":{"name":"punctuation.definition.string.rust"}},"end":"(\\")(\\\\2)","endCaptures":{"1":{"name":"punctuation.definition.string.rust"},"2":{"name":"punctuation.definition.string.raw.rust"}},"name":"string.quoted.double.rust"},{"begin":"(b)?(')","beginCaptures":{"1":{"name":"string.quoted.byte.raw.rust"},"2":{"name":"punctuation.definition.char.rust"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.char.rust"}},"name":"string.quoted.single.char.rust","patterns":[{"include":"#escapes"}]}]},"types":{"patterns":[{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\\\\b"},{"begin":"\\\\b(_?[A-Z][0-9A-Z_a-z]*)(<)","beginCaptures":{"1":{"name":"entity.name.type.rust"},"2":{"name":"punctuation.brackets.angle.rust"}},"end":">","endCaptures":{"0":{"name":"punctuation.brackets.angle.rust"}},"patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#lifetimes"},{"include":"#punctuation"},{"include":"#types"},{"include":"#variables"}]},{"match":"\\\\b(bool|char|str)\\\\b","name":"entity.name.type.primitive.rust"},{"captures":{"1":{"name":"keyword.declaration.trait.rust storage.type.rust"},"2":{"name":"entity.name.type.trait.rust"}},"match":"\\\\b(trait)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"keyword.declaration.struct.rust storage.type.rust"},"2":{"name":"entity.name.type.struct.rust"}},"match":"\\\\b(struct)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"keyword.declaration.enum.rust storage.type.rust"},"2":{"name":"entity.name.type.enum.rust"}},"match":"\\\\b(enum)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"keyword.declaration.type.rust storage.type.rust"},"2":{"name":"entity.name.type.declaration.rust"}},"match":"\\\\b(type)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"match":"\\\\b_?[A-Z][0-9A-Z_a-z]*\\\\b(?!!)","name":"entity.name.type.rust"}]},"variables":{"patterns":[{"match":"\\\\b(?<!(?<!\\\\.)\\\\.)(?:r#(?!(crate|[Ss]elf|super)))?[0-9_a-z]+\\\\b","name":"variable.other.rust"}]}},"scopeName":"source.rust","aliases":["rs"]}`)),t=[e];export{t as default};
@@ -0,0 +1 @@
1
+ import{u as H,r as l,d as O,j as t}from"./main-mIHr_ble.js";import{H as A,l as _,V as $,p as B,c as Q}from"./button-BaHefIXU.js";import{D as P,a as U}from"./use-file-explorer-state-CLaDuI9X.js";import{c as M}from"./_sessionKey-BidmO1-D.js";import"./useButton-DsMdJPGn.js";import"./tooltip-w9D-e_R-.js";import"./DirectionContext-DXnZc0zz.js";import"./visuallyHidden-CqGRL_Oq.js";import"./useCompositeItem-CaYygSfB.js";import"./react-Cfq4ot0g.js";import"./useControlled-wOKVgKF4.js";import"./CSPContext-BBLAL_m_.js";import"./useMutation-fJnleJAb.js";import"./opencami-logo-CRIdKbbZ.js";import"./index-B2iG4EM1.js";import"./index-T4TOjvD0.js";function V(e){return Array.isArray(e)?e.map(s=>s?.type==="text"&&typeof s.text=="string"?s.text:"").filter(Boolean).join(" "):""}function K(e){const s=V(e.content);return s||(typeof e.text=="string"?e.text:"")}function G({sessions:e,currentFriendlyId:s,currentSessionKey:y}){const g=H(),[m,o]=l.useState(""),[h,f]=l.useState(!1),[b,i]=l.useState([]),c=l.useRef(null);l.useEffect(()=>()=>{c.current?.abort(),c.current=null},[]);const j=l.useCallback(v=>{if(!v.trim()||!s||!y)return[];const I=M.history(s,y),w=g.getQueryData(I);if(!w?.messages)return[];const k=v.toLowerCase(),x=[],S=e.find(p=>p.friendlyId===s),n=S?.label||S?.title||S?.derivedTitle||s;return w.messages.forEach((p,R)=>{const a=K(p);if(!a)return;const u=a.toLowerCase().indexOf(k);u!==-1&&x.push({sessionKey:y,friendlyId:s,sessionTitle:n,messageIndex:R,messageId:typeof p.id=="string"?p.id:void 0,messageRole:p.role||"unknown",messageText:a,matchStart:u,matchEnd:u+v.length,timestamp:p.timestamp})}),x},[s,y,g,e]),d=l.useCallback(async v=>{const I=v.trim();if(!I)return c.current?.abort(),c.current=null,i([]),[];c.current?.abort();const w=new AbortController;c.current=w,f(!0),i([]);const k=I.toLowerCase(),x=[],S=10;try{for(let n=0;n<e.length;n+=S){if(w.signal.aborted)throw new DOMException("Search aborted","AbortError");const p=e.slice(n,n+S),R=await Promise.allSettled(p.map(async a=>{const r=M.history(a.friendlyId,a.key);let u=g.getQueryData(r);if(!u){const N=new URLSearchParams({sessionKey:a.key,friendlyId:a.friendlyId,limit:"200"}),T=await fetch(`/api/history?${N.toString()}`,{signal:w.signal});T.ok&&(u=await T.json(),g.setQueryData(r,u))}if(!u?.messages)return[];const z=a.label||a.title||a.derivedTitle||a.friendlyId,L=[];return u.messages.forEach((N,T)=>{const C=K(N);if(!C)return;const D=C.toLowerCase().indexOf(k);D!==-1&&L.push({sessionKey:a.key,friendlyId:a.friendlyId,sessionTitle:z,messageIndex:T,messageId:typeof N.id=="string"?N.id:void 0,messageRole:N.role||"unknown",messageText:C,matchStart:D,matchEnd:D+I.length,timestamp:N.timestamp})}),L}));for(const a of R)a.status==="fulfilled"&&x.push(...a.value);x.sort((a,r)=>(r.timestamp||0)-(a.timestamp||0)),i([...x])}return x}catch(n){if(!(n instanceof DOMException&&n.name==="AbortError"))throw n;return[]}finally{c.current===w&&(c.current=null,f(!1))}},[e,g]),E=l.useCallback(()=>{c.current?.abort(),c.current=null,f(!1),o(""),i([])},[]);return{query:m,setQuery:o,isSearching:h,globalResults:b,searchCurrentConversation:j,searchAllSessions:d,clearSearch:E}}function Y(e,s){if(!s.trim())return null;const y=e.toLowerCase(),g=s.toLowerCase(),m=y.indexOf(g);if(m===-1)return null;const o=40,h=80;let f=Math.max(0,m-o),b=Math.min(e.length,m+s.length+h);if(f>0){const d=e.indexOf(" ",f);d!==-1&&d<m&&(f=d+1)}if(b<e.length){const d=e.lastIndexOf(" ",b);d>m+s.length&&(b=d)}const i=(f>0?"...":"")+e.slice(f,m),c=e.slice(m,m+s.length),j=e.slice(m+s.length,b)+(b<e.length?"...":"");return{before:i,match:c,after:j}}const Z="opencami-search-jump-target";function de({open:e,onOpenChange:s,sessions:y,currentFriendlyId:g,currentSessionKey:m,mode:o,onJumpToMessage:h}){const f=O(),b=l.useRef(null),[i,c]=l.useState(""),[j,d]=l.useState(0),E=l.useRef(null),{isSearching:v,globalResults:I,searchCurrentConversation:w,searchAllSessions:k,clearSearch:x}=G({sessions:y,currentFriendlyId:g,currentSessionKey:m}),S=l.useMemo(()=>o!=="current"?[]:w(i),[o,i,w]),n=o==="global"?I:S;l.useEffect(()=>{if(o!=="global")return;if(!i.trim()){x();return}const r=setTimeout(()=>{k(i)},300);return()=>clearTimeout(r)},[i,o,k,x]),l.useEffect(()=>{if(!e){x();return}c(""),d(0),x(),setTimeout(()=>{b.current?.focus()},50)},[e,x]),l.useEffect(()=>{d(0)},[n]),l.useEffect(()=>{if(!E.current)return;const r=E.current.querySelector('[data-selected="true"]');r&&r.scrollIntoView({block:"nearest"})},[j]);const p=l.useCallback(r=>{if(s(!1),o==="current"&&h)h(r);else{if(r.messageId&&typeof window<"u")try{sessionStorage.setItem(Z,JSON.stringify({friendlyId:r.friendlyId,messageId:r.messageId,at:Date.now()}))}catch{}f({to:"/chat/$sessionKey",params:{sessionKey:r.friendlyId}})}},[o,f,h,s]),R=l.useCallback(r=>{switch(r.key){case"ArrowDown":r.preventDefault(),d(u=>Math.min(u+1,n.length-1));break;case"ArrowUp":r.preventDefault(),d(u=>Math.max(u-1,0));break;case"Enter":r.preventDefault(),n[j]&&p(n[j]);break;case"Escape":r.preventDefault(),s(!1);break}},[n,j,p,s]),a=o==="global"?"Search across all conversations...":"Search in this conversation...";return t.jsx(P,{open:e,onOpenChange:s,children:t.jsxs(U,{className:"w-[min(600px,92vw)] max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center gap-3 p-4 border-b border-primary-200",children:[t.jsx(A,{icon:_,size:20,className:"text-primary-500 shrink-0"}),t.jsx("input",{ref:b,type:"text",value:i,onChange:r=>c(r.target.value),onKeyDown:R,placeholder:a,className:"flex-1 bg-transparent text-primary-900 placeholder:text-primary-400 outline-none text-base"}),i&&t.jsx("button",{type:"button",onClick:()=>{c(""),x()},className:"p-1 hover:bg-primary-200 rounded transition-colors",children:t.jsx(A,{icon:$,size:16,className:"text-primary-500"})}),v&&t.jsx(A,{icon:B,size:20,className:"text-primary-500 animate-spin"})]}),t.jsx("div",{ref:E,className:"flex-1 overflow-y-auto p-2 min-h-0",children:i.trim()?n.length===0&&!v?t.jsxs("div",{className:"text-center text-primary-500 py-8 text-sm",children:['No results found for "',i,'"']}):t.jsx("div",{className:"flex flex-col gap-1",children:n.map((r,u)=>t.jsx(J,{result:r,query:i,isSelected:u===j,showSessionTitle:o==="global",onClick:()=>p(r),onMouseEnter:()=>d(u)},`${r.friendlyId}-${r.messageIndex}`))}):t.jsx("div",{className:"text-center text-primary-500 py-8 text-sm",children:o==="global"?"Type to search across all your conversations":"Type to search within this conversation"})}),t.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-t border-primary-200 text-xs text-primary-500",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-primary-100 rounded text-[10px]",children:"↑"}),t.jsx("kbd",{className:"px-1.5 py-0.5 bg-primary-100 rounded text-[10px]",children:"↓"}),"to navigate"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-primary-100 rounded text-[10px]",children:"Enter"}),"to select"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-primary-100 rounded text-[10px]",children:"Esc"}),"to close"]})]}),n.length>0&&t.jsxs("span",{children:[n.length," result",n.length!==1?"s":""]})]})]})})}function J({result:e,query:s,isSelected:y,showSessionTitle:g,onClick:m,onMouseEnter:o}){const h=Y(e.messageText,s),f=e.messageRole==="assistant"?"Assistant":"You";return t.jsxs("button",{type:"button",onClick:m,onMouseEnter:o,"data-selected":y,className:Q("w-full text-left px-3 py-2 rounded-lg transition-colors",y?"bg-primary-200":"hover:bg-primary-100"),children:[g&&t.jsx("div",{className:"text-xs font-medium text-primary-600 mb-1 truncate",children:e.sessionTitle}),t.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:t.jsx("span",{className:Q("text-[10px] font-medium px-1.5 py-0.5 rounded",e.messageRole==="assistant"?"bg-blue-100 text-blue-700":"bg-green-100 text-green-700"),children:f})}),h&&t.jsxs("div",{className:"text-sm text-primary-700 line-clamp-2",children:[t.jsx("span",{children:h.before}),t.jsx("mark",{className:"bg-yellow-200 text-primary-900 rounded px-0.5",children:h.match}),t.jsx("span",{children:h.after})]})]})}export{de as SearchDialog};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./main-mIHr_ble.js";import{D as x,a as p,b as h,c as u,d as j}from"./use-file-explorer-state-CLaDuI9X.js";import{B as v}from"./button-BaHefIXU.js";import"./useButton-DsMdJPGn.js";import"./tooltip-w9D-e_R-.js";import"./DirectionContext-DXnZc0zz.js";import"./visuallyHidden-CqGRL_Oq.js";import"./useCompositeItem-CaYygSfB.js";import"./react-Cfq4ot0g.js";const f=[{value:"markdown",label:"Markdown (.md)",description:"Nicely formatted with headers and sections"},{value:"json",label:"JSON (.json)",description:"Full data with metadata"},{value:"txt",label:"Plain Text (.txt)",description:"Simple text format"}];function S({open:t,onOpenChange:s,sessionTitle:i,onExport:l,onCancel:o}){const[r,n]=d.useState("markdown"),m=()=>{l(r)};return e.jsx(x,{open:t,onOpenChange:s,children:e.jsx(p,{children:e.jsxs("div",{className:"p-4",children:[e.jsx(h,{className:"mb-1",children:"Export Conversation"}),e.jsxs(u,{className:"mb-4",children:['Export "',i,'" in your preferred format']}),e.jsx("div",{className:"space-y-2 mb-4",children:f.map(a=>e.jsxs("label",{className:"flex items-start gap-3 p-3 rounded-lg border border-primary-200 cursor-pointer hover:bg-primary-100 transition-colors",children:[e.jsx("input",{type:"radio",name:"export-format",value:a.value,checked:r===a.value,onChange:c=>n(c.target.value),className:"mt-1"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-sm text-primary-900",children:a.label}),e.jsx("div",{className:"text-xs text-primary-600",children:a.description})]})]},a.value))}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(j,{onClick:o,children:"Cancel"}),e.jsx(v,{onClick:m,children:"Export"})]})]})})})}export{S as SessionExportDialog};
@@ -0,0 +1 @@
1
+ import{r as o,j as t}from"./main-mIHr_ble.js";import{B as L,H as w,V as Fe,z as ze,d as Ke,P as Re,D as Be,R as Me,s as De,T as _e,c as W,o as Ue,v as He,e as Ye,f as qe,g as Ge,h as Je,J as H,i as Xe}from"./button-BaHefIXU.js";import{D as $e,a as Qe,b as Ze,c as et,d as Y}from"./use-file-explorer-state-CLaDuI9X.js";import{S as m}from"./switch-Bh9tVOYh.js";import{T as g,a as y,b as v}from"./tabs-BfaEc9zS.js";import{u as tt}from"./index-B2iG4EM1.js";import{u as at,g as q}from"./_sessionKey-BidmO1-D.js";import"./useButton-DsMdJPGn.js";import"./tooltip-w9D-e_R-.js";import"./DirectionContext-DXnZc0zz.js";import"./visuallyHidden-CqGRL_Oq.js";import"./useCompositeItem-CaYygSfB.js";import"./react-Cfq4ot0g.js";import"./useControlled-wOKVgKF4.js";import"./CSPContext-BBLAL_m_.js";import"./useMutation-fJnleJAb.js";import"./opencami-logo-CRIdKbbZ.js";import"./index-T4TOjvD0.js";function f({title:n,tabId:r,activeTab:j,children:a}){const c=r&&j&&r!==j;return t.jsxs("div",{className:W("border-b border-primary-200 py-2 last:border-0",c&&"md:hidden"),children:[t.jsx("h3",{className:"mb-1.5 text-sm font-semibold text-primary-700",children:n}),t.jsx("div",{className:"space-y-1.5",children:a})]})}function l({label:n,description:r,inline:j,children:a}){return j?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex-1 select-none",children:[t.jsx("div",{className:"text-[13px] font-medium text-primary-800",children:n}),r&&t.jsx("div",{className:"text-xs text-primary-500",children:r})]}),t.jsx("div",{className:"flex items-center gap-2",children:a})]}):t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"select-none",children:[t.jsx("div",{className:"text-[13px] font-medium text-primary-800",children:n}),r&&t.jsx("div",{className:"text-xs text-primary-500",children:r})]}),t.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:a})]})}const te=[{value:"14px",label:"S"},{value:"16px",label:"M"},{value:"18px",label:"L"},{value:"20px",label:"XL"}],O=[{value:"system",label:"System",cssValue:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',previewClass:"font-sans"},{value:"inter",label:"Inter",cssValue:'"Inter", sans-serif',previewClass:'font-["Inter",sans-serif]'},{value:"roboto",label:"Roboto",cssValue:'"Roboto", sans-serif',previewClass:'font-["Roboto",sans-serif]'}],ae=[{value:"compact",label:"Compact"},{value:"comfortable",label:"Comfortable"},{value:"spacious",label:"Spacious"}],F=[{value:"green",label:"Green",accent:"#22c55e",hover:"#16a34a",light:"rgba(34, 197, 94, 0.10)"},{value:"blue",label:"Blue",accent:"#3b82f6",hover:"#2563eb",light:"rgba(59, 130, 246, 0.10)"},{value:"purple",label:"Purple",accent:"#8b5cf6",hover:"#7c3aed",light:"rgba(139, 92, 246, 0.10)"},{value:"orange",label:"Orange",accent:"#f97316",hover:"#ea580c",light:"rgba(249, 115, 22, 0.10)"},{value:"pink",label:"Pink",accent:"#ec4899",hover:"#db2777",light:"rgba(236, 72, 153, 0.10)"},{value:"red",label:"Red",accent:"#ef4444",hover:"#dc2626",light:"rgba(239, 68, 68, 0.10)"},{value:"cyan",label:"Cyan",accent:"#06b6d4",hover:"#0891b2",light:"rgba(6, 182, 212, 0.10)"},{value:"yellow",label:"Yellow",accent:"#eab308",hover:"#ca8a04",light:"rgba(234, 179, 8, 0.10)"}],z=[{value:"narrow",label:"Narrow",cssValue:"640px"},{value:"medium",label:"Medium",cssValue:"800px"},{value:"wide",label:"Wide",cssValue:"1000px"},{value:"full",label:"Full",cssValue:"100%"}],K=[{value:"compact",label:"Compact",cssValue:"200px"},{value:"normal",label:"Normal",cssValue:"260px"},{value:"wide",label:"Wide",cssValue:"320px"},{value:"xl",label:"XL",cssValue:"400px"}],se=[{value:"default",label:"Default"},{value:"bubbles",label:"Bubbles"},{value:"minimal",label:"Minimal"}];function G(n){return te.some(r=>r.value===n)}function J(n){return O.some(r=>r.value===n)}function X(n){return ae.some(r=>r.value===n)}function $(n){return F.some(r=>r.value===n)}function Q(n){return z.some(r=>r.value===n)}function Z(n){return K.some(r=>r.value===n)}function ee(n){return se.some(r=>r.value===n)}function jt({open:n,onOpenChange:r,onClose:j}){const{settings:a,updateSettings:c}=tt(),{settings:d,updateSettings:h,status:C,testApiKey:le}=at(),[p,re]=o.useState("appearance"),[x,B]=o.useState(d.llmApiKey),[M,D]=o.useState(!1),[S,N]=o.useState(null),[ne,ie]=o.useState(()=>{if(typeof window>"u")return"16px";try{const e=localStorage.getItem("opencami-text-size");if(e&&G(e))return e}catch{}return"16px"}),[oe,ce]=o.useState(()=>{if(typeof window>"u")return!0;try{const e=localStorage.getItem("opencami-tts-enabled");return e===null?!0:e==="true"}catch{return!0}}),[_,de]=o.useState(()=>{if(typeof window>"u")return"auto";try{return localStorage.getItem("opencami-tts-provider")||"auto"}catch{return"auto"}}),[ue,me]=o.useState(()=>{if(typeof window>"u")return"nova";try{return localStorage.getItem("opencami-tts-voice")||"nova"}catch{return"nova"}}),[pe,he]=o.useState(()=>{if(typeof window>"u")return"auto";try{return localStorage.getItem("opencami-stt-provider")||"auto"}catch{return"auto"}});o.useEffect(()=>{if(!(typeof window>"u"))try{const e=localStorage.getItem("opencami-font-family");e&&J(e)?(k(e),a.fontFamily!==e&&c({fontFamily:e})):k(a.fontFamily);const s=localStorage.getItem("opencami-density");s&&X(s)?(P(s),a.density!==s&&c({density:s})):P(a.density);const i=localStorage.getItem("opencami-accent-color");i&&$(i)?(I(i),a.accentColor!==i&&c({accentColor:i})):I(a.accentColor);const u=localStorage.getItem("opencami-chat-width");u&&Q(u)?(A(u),a.chatWidth!==u&&c({chatWidth:u})):A(a.chatWidth);const b=localStorage.getItem("opencami-sidebar-width");b&&Z(b)?(E(b),a.sidebarWidth!==b&&c({sidebarWidth:b})):E(a.sidebarWidth);const V=localStorage.getItem("opencami-bubble-style");V&&ee(V)?(T(V),a.bubbleStyle!==V&&c({bubbleStyle:V})):T(a.bubbleStyle)}catch{k(a.fontFamily),P(a.density),I(a.accentColor),A(a.chatWidth),E(a.sidebarWidth),T(a.bubbleStyle)}},[]),o.useEffect(()=>{k(a.fontFamily)},[a.fontFamily]),o.useEffect(()=>{P(a.density)},[a.density]),o.useEffect(()=>{I(a.accentColor)},[a.accentColor]),o.useEffect(()=>{A(a.chatWidth)},[a.chatWidth]),o.useEffect(()=>{E(a.sidebarWidth)},[a.sidebarWidth]),o.useEffect(()=>{T(a.bubbleStyle)},[a.bubbleStyle]);const xe=e=>{de(e);try{localStorage.setItem("opencami-tts-provider",e)}catch{}},be=e=>{me(e);try{localStorage.setItem("opencami-tts-voice",e)}catch{}},fe=e=>{he(e);try{localStorage.setItem("opencami-stt-provider",e)}catch{}};function ge(e){typeof document>"u"||document.documentElement.style.setProperty("--opencami-text-size",e)}function k(e){if(typeof document>"u")return;const i=O.find(u=>u.value===e)?.cssValue??O[0].cssValue;document.documentElement.style.setProperty("--opencami-font-family",i)}function P(e){if(typeof document>"u")return;const s=document.documentElement;if(s.style.setProperty("--opencami-density",e),e==="compact"){s.style.setProperty("--opencami-msg-padding-y","0.25rem"),s.style.setProperty("--opencami-msg-gap","0.25rem"),s.style.setProperty("--opencami-user-bubble-py","0.4rem");return}if(e==="spacious"){s.style.setProperty("--opencami-msg-padding-y","1.25rem"),s.style.setProperty("--opencami-msg-gap","1rem"),s.style.setProperty("--opencami-user-bubble-py","1rem");return}s.style.setProperty("--opencami-msg-padding-y","0.75rem"),s.style.setProperty("--opencami-msg-gap","0.5rem"),s.style.setProperty("--opencami-user-bubble-py","0.625rem")}function I(e){if(typeof document>"u")return;const s=F.find(u=>u.value===e)??F[0],i=document.documentElement;i.style.setProperty("--opencami-accent",s.accent),i.style.setProperty("--opencami-accent-hover",s.hover),i.style.setProperty("--opencami-accent-light",s.light)}function A(e){if(typeof document>"u")return;const s=z.find(i=>i.value===e)??z[2];document.documentElement.style.setProperty("--opencami-chat-width",s.cssValue)}function E(e){if(typeof document>"u")return;const s=K.find(i=>i.value===e)??K[1];document.documentElement.style.setProperty("--opencami-sidebar-width",s.cssValue)}function T(e){typeof document>"u"||document.documentElement.setAttribute("data-opencami-bubble-style",e)}const ye=e=>{if(G(e)){ie(e),ge(e);try{localStorage.setItem("opencami-text-size",e)}catch{}}},ve=e=>{if(J(e)){k(e),c({fontFamily:e});try{localStorage.setItem("opencami-font-family",e)}catch{}}},je=e=>{if(X(e)){P(e),c({density:e});try{localStorage.setItem("opencami-density",e)}catch{}}},Se=e=>{if($(e)){I(e),c({accentColor:e});try{localStorage.setItem("opencami-accent-color",e)}catch{}}},we=e=>{if(Q(e)){A(e),c({chatWidth:e});try{localStorage.setItem("opencami-chat-width",e)}catch{}}},Ce=e=>{if(Z(e)){E(e),c({sidebarWidth:e});try{localStorage.setItem("opencami-sidebar-width",e)}catch{}}},Ne=e=>{if(ee(e)){T(e),c({bubbleStyle:e});try{localStorage.setItem("opencami-bubble-style",e)}catch{}}},ke=e=>{ce(e);try{localStorage.setItem("opencami-tts-enabled",String(e))}catch{}window.dispatchEvent(new StorageEvent("storage",{key:"opencami-tts-enabled",newValue:String(e)}))},[U,Pe]=o.useState(!1),R=o.useRef(null),[Ie,Ae]=o.useState(()=>{if(typeof window>"u")return!0;try{const e=localStorage.getItem("opencami-personas-enabled");return e===null?!0:e==="true"}catch{return!0}});o.useEffect(()=>{let e=!0;async function s(){R.current?.abort();const i=new AbortController;R.current=i;try{const u=await fetch("/api/personas",{signal:i.signal});if(!u.ok)return;const b=await u.json();e&&b.ok&&Pe(b.available)}catch(u){if(u instanceof Error&&u.name==="AbortError")return}}return s(),()=>{e=!1,R.current?.abort()}},[]);const Ee=e=>{Ae(e);try{localStorage.setItem("opencami-personas-enabled",String(e))}catch{}window.dispatchEvent(new StorageEvent("storage",{key:"opencami-personas-enabled",newValue:String(e)}))},Te=async()=>{if(x.trim()){D(!0),N(null);try{const e=await le(x.trim());N(e),e.valid&&h({llmApiKey:x.trim()})}finally{D(!1)}}},Ve=()=>{h({llmApiKey:x.trim()}),N(null)},Le=()=>{B(""),h({llmApiKey:""}),N(null)},We=[{value:"system",label:"Auto",icon:Ue},{value:"light",label:"Light",icon:He},{value:"dark",label:"Dark",icon:Ye},{value:"chameleon",label:"Cham",icon:qe},{value:"frost-light",label:"Ice",icon:Ge}];function Oe(e){if(typeof document>"u")return;const s=document.documentElement,i=window.matchMedia("(prefers-color-scheme: dark)");s.classList.remove("light","dark","system","chameleon","frost","frost-light","frost-dark"),s.classList.add(e),(e==="frost-light"||e==="frost-dark")&&s.classList.add("frost"),e==="frost-dark"&&s.classList.add("dark"),e==="system"&&i.matches&&s.classList.add("dark")}return t.jsx($e,{open:n,onOpenChange:r,children:t.jsx(Qe,{className:"w-[min(680px,92vw)] max-h-[85vh] overflow-y-auto",children:t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{children:[t.jsx(Ze,{className:"mb-1",children:"Settings"}),t.jsx(et,{className:"hidden",children:"Configure OpenCami"})]}),t.jsx(Y,{render:t.jsx(L,{size:"icon-sm",variant:"ghost",className:"text-primary-500 hover:bg-primary-100 hover:text-primary-700","aria-label":"Close",children:t.jsx(w,{icon:Fe,size:20,strokeWidth:1.5})})})]}),t.jsxs("div",{className:"mt-2 flex md:flex-row flex-col md:gap-3 gap-0 md:min-h-[400px]",children:[t.jsx("nav",{className:"hidden md:flex flex-col gap-0.5 min-w-[160px] border-r border-primary-200 pr-3",children:[{id:"connection",label:"Connection",icon:ze},{id:"appearance",label:"Appearance",icon:Ke},{id:"chat",label:"Chat",icon:Re},{id:"personas",label:"Personas",icon:Be},{id:"voice",label:"Voice",icon:Me},{id:"llm",label:"LLM Features",icon:De},{id:"about",label:"About",icon:_e}].map(e=>t.jsxs("button",{onClick:()=>re(e.id),className:W("flex items-center gap-2 px-2.5 py-1.5 rounded-md text-sm text-left transition-colors",p===e.id?"text-primary-900 font-medium":"text-primary-600 hover:text-primary-900 hover:bg-primary-50"),style:p===e.id?{backgroundColor:"var(--opencami-accent-light)"}:void 0,children:[t.jsx(w,{icon:e.icon,size:16,strokeWidth:1.5}),e.label]},e.id))}),t.jsxs("div",{className:"flex-1 overflow-y-auto md:max-h-[calc(85vh-90px)] max-h-none",children:[t.jsx(f,{title:"Connection",tabId:"connection",activeTab:p,children:t.jsx(l,{inline:!0,label:"Status",children:t.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-green-600",children:[t.jsx("span",{className:"size-2 rounded-full bg-green-500"}),"Connected"]})})}),t.jsxs(f,{title:"Appearance",tabId:"appearance",activeTab:p,children:[t.jsx(l,{label:"Theme",children:t.jsx(g,{value:a.theme,onValueChange:e=>{const s=e;Oe(s),c({theme:s})},children:t.jsx(y,{variant:"default",className:"gap-1.5 flex-wrap *:data-[slot=tab-indicator]:duration-0",children:We.map(e=>t.jsxs(v,{value:e.value,className:"text-[11px] px-1 py-0.5 gap-0.5",children:[e.icon&&t.jsx(w,{icon:e.icon,size:13,strokeWidth:1.5}),t.jsx("span",{children:e.label})]},e.value))})})}),t.jsx(l,{label:"Accent Color",children:t.jsx("div",{className:"flex gap-0.5 flex-wrap",children:F.map(e=>{const s=a.accentColor===e.value;return t.jsx("button",{type:"button",onClick:()=>Se(e.value),className:W("flex items-center justify-center rounded-md p-1 transition-all duration-150",s?"scale-110":"hover:bg-primary-50 hover:scale-105"),children:t.jsx("span",{className:W("size-6 rounded-full transition-shadow duration-150",s?"ring-2 ring-offset-2":"border-2 border-primary-200"),style:{backgroundColor:e.accent,...s?{"--tw-ring-color":e.accent}:{}}})},e.value)})})}),t.jsx(l,{label:"Text Size",children:t.jsx(g,{value:ne,onValueChange:ye,children:t.jsx(y,{variant:"default",className:"gap-2 *:data-[slot=tab-indicator]:duration-0",children:te.map(e=>t.jsx(v,{value:e.value,children:t.jsx("span",{className:"tabular-nums text-xs",children:e.label})},e.value))})})}),t.jsx(l,{inline:!0,label:"Font",children:t.jsx(g,{value:a.fontFamily,onValueChange:ve,children:t.jsx(y,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:O.map(e=>t.jsx(v,{value:e.value,children:t.jsx("span",{className:"text-xs",style:{fontFamily:e.cssValue},children:e.label})},e.value))})})}),t.jsx(l,{inline:!0,label:"Density",children:t.jsx(g,{value:a.density,onValueChange:je,children:t.jsx(y,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:ae.map(e=>t.jsx(v,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(l,{inline:!0,label:"Bubbles",children:t.jsx(g,{value:a.bubbleStyle,onValueChange:Ne,children:t.jsx(y,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:se.map(e=>t.jsx(v,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(l,{inline:!0,label:"Chat Width",children:t.jsx(g,{value:a.chatWidth,onValueChange:we,children:t.jsx(y,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:z.map(e=>t.jsx(v,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(l,{inline:!0,label:"Sidebar",children:t.jsx(g,{value:a.sidebarWidth,onValueChange:Ce,children:t.jsx(y,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:K.map(e=>t.jsx(v,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})})]}),t.jsxs(f,{title:"Chat",tabId:"chat",activeTab:p,children:[t.jsx(l,{inline:!0,label:"Show tool messages",children:t.jsx(m,{checked:a.showToolMessages,onCheckedChange:e=>c({showToolMessages:e})})}),t.jsx(l,{inline:!0,label:"Show reasoning blocks",children:t.jsx(m,{checked:a.showReasoningBlocks,onCheckedChange:e=>c({showReasoningBlocks:e})})}),t.jsx(l,{inline:!0,label:"Show search sources",children:t.jsx(m,{checked:a.showSearchSources,onCheckedChange:e=>c({showSearchSources:e})})}),t.jsx(l,{inline:!0,label:"Agent Manager (Beta)",description:"Show Agent Manager in sidebar for creating and managing agents",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-agent-manager")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-agent-manager",String(e)),window.location.reload()}})}),t.jsx(l,{inline:!0,label:"Skills Browser (Beta)",description:"Browse and install skills from ClawHub",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-skills-browser")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-skills-browser",String(e)),window.location.reload()}})}),t.jsx(l,{inline:!0,label:"Cron Jobs Panel (Beta)",description:"Show Cron Jobs in sidebar for managing OpenClaw cron schedules",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-cron-manager")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-cron-manager",String(e)),window.location.reload()}})}),t.jsx(l,{inline:!0,label:"Inline File Preview",description:"Make file paths in messages clickable to preview file contents",children:t.jsx(m,{checked:a.inlineFilePreview,onCheckedChange:e=>c({inlineFilePreview:e})})})]}),t.jsxs(f,{title:"Personas",tabId:"personas",activeTab:p,children:[U?t.jsx(l,{inline:!0,label:"Persona Picker",description:"Show persona picker in chat (20 personalities)",children:t.jsx(m,{checked:Ie,onCheckedChange:Ee})}):t.jsx(l,{inline:!0,label:"Persona Picker",description:"Install the Personas skill to unlock 20 AI personalities",children:t.jsx(m,{checked:!1,disabled:!0})}),!U&&t.jsx("div",{className:"pt-1",children:t.jsx("a",{href:"https://www.clawhub.ai/robbyczgw-cla/personas",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary-600 hover:text-primary-900 hover:underline",children:"Get it on ClawHub →"})})]}),t.jsxs(f,{title:"Text-to-Speech",tabId:"voice",activeTab:p,children:[t.jsx(l,{inline:!0,label:"Voice Playback",description:"Add a 🔊 button to AI messages for text-to-speech",children:t.jsx(m,{checked:oe,onCheckedChange:ke})}),t.jsx(l,{inline:!0,label:"TTS Provider",description:"Choose which service generates speech",children:t.jsxs("select",{value:_,onChange:e=>xe(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"auto",children:"Auto"}),t.jsx("option",{value:"elevenlabs",children:"ElevenLabs"}),t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"edge",children:"Edge TTS (free)"})]})}),_==="openai"&&t.jsx(l,{inline:!0,label:"Voice",description:"OpenAI voice selection",children:t.jsx("select",{value:ue,onChange:e=>be(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:["alloy","echo","fable","onyx","nova","shimmer"].map(e=>t.jsx("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})})]}),t.jsx(f,{title:"Speech-to-Text",tabId:"voice",activeTab:p,children:t.jsx(l,{inline:!0,label:"STT Provider",description:"Choose which service transcribes your voice",children:t.jsxs("select",{value:pe,onChange:e=>fe(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"auto",children:"Auto"}),t.jsx("option",{value:"elevenlabs",children:"ElevenLabs"}),t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"browser",children:"Browser (free)"})]})})}),t.jsxs(f,{title:"LLM Features",tabId:"llm",activeTab:p,children:[t.jsxs("div",{className:"text-xs text-primary-500 mb-3",children:["Enhance session titles and follow-up suggestions using an LLM provider.",C.hasEnvKey&&d.llmProvider==="openai"&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has OPENAI_API_KEY configured"}),C.hasOpenRouterKey&&d.llmProvider==="openrouter"&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has OPENROUTER_API_KEY configured"})]}),t.jsx(l,{inline:!0,label:"Provider",description:"Choose LLM provider for titles & follow-ups",children:t.jsxs("select",{value:d.llmProvider,onChange:e=>{const s=e.target.value;h({llmProvider:s,llmBaseUrl:"",llmModel:""})},className:"px-2 py-1 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"openrouter",children:"OpenRouter"}),t.jsx("option",{value:"ollama",children:"Ollama (local)"}),t.jsx("option",{value:"custom",children:"Custom"})]})}),t.jsx(l,{inline:!0,label:"Smart session titles",description:"Generate concise titles using AI",children:t.jsx(m,{checked:d.useLlmTitles,onCheckedChange:e=>h({useLlmTitles:e}),disabled:!C.isAvailable})}),t.jsx(l,{inline:!0,label:"Smart follow-up suggestions",description:"AI-generated contextual follow-ups",children:t.jsx(m,{checked:d.useLlmFollowUps,onCheckedChange:e=>h({useLlmFollowUps:e}),disabled:!C.isAvailable})}),t.jsxs("div",{className:"mt-2 space-y-2",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-primary-500 mb-1",children:"Model"}),t.jsx("input",{type:"text",value:d.llmModel,onChange:e=>h({llmModel:e.target.value}),placeholder:q(d.llmProvider).model||"model-name",className:"w-full px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),(d.llmProvider==="custom"||d.llmProvider==="ollama")&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-primary-500 mb-1",children:"Base URL"}),t.jsx("input",{type:"text",value:d.llmBaseUrl,onChange:e=>h({llmBaseUrl:e.target.value}),placeholder:q(d.llmProvider).baseUrl||"https://...",className:"w-full px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"})]})]}),t.jsxs("div",{className:"mt-4 pt-3 border-t border-primary-100",children:[t.jsx("div",{className:"text-sm text-primary-800 mb-2",children:d.llmProvider==="ollama"?"API Key (optional)":"API Key"}),t.jsx("div",{className:"text-xs text-primary-500 mb-2",children:d.llmProvider==="ollama"?"Not required for local Ollama":C.hasEnvKey&&d.llmProvider==="openai"?"Optional: Override server key with your own":`Required for ${d.llmProvider==="openrouter"?"OpenRouter":"LLM features"} (stored locally)`}),t.jsxs("div",{className:"text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded-md px-2 py-1.5 mb-2",children:["⚠️ ",t.jsx("strong",{children:"Security Note:"})," API keys are stored in your browser's localStorage. This is convenient but not secure for shared computers. For production use, configure keys server-side via environment variables (OPENAI_API_KEY, OPENROUTER_API_KEY)."]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("input",{type:"password",value:x,onChange:e=>{B(e.target.value),N(null)},placeholder:"sk-...",className:"flex-1 px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"}),t.jsx(L,{size:"sm",variant:"outline",onClick:Te,disabled:!x.trim()||M,className:"min-w-[60px]",children:M?t.jsx(w,{icon:Je,size:16,className:"animate-spin"}):"Test"})]}),S&&t.jsxs("div",{className:`mt-2 flex items-center gap-1.5 text-xs ${S.valid?"text-green-600":"text-red-600"}`,children:[t.jsx(w,{icon:S.valid?H:Xe,size:14}),S.valid?"API key is valid":S.error||"Invalid API key"]}),d.llmApiKey&&t.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-green-600 flex items-center gap-1",children:[t.jsx(w,{icon:H,size:14}),"Key saved"]}),t.jsx(L,{size:"sm",variant:"ghost",onClick:Le,className:"text-xs text-red-600 hover:text-red-700 hover:bg-red-50",children:"Clear"})]}),x&&x!==d.llmApiKey&&!S?.valid&&t.jsx(L,{size:"sm",variant:"outline",onClick:Ve,className:"mt-2 w-full",children:"Save without testing"})]})]}),t.jsxs(f,{title:"About",tabId:"about",activeTab:p,children:[t.jsx("div",{className:"text-sm text-primary-800",children:"OpenCami"}),t.jsxs("div",{className:"flex gap-4 pt-2",children:[t.jsx("a",{href:"https://github.com/robbyczgw-cla/opencami",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-600 hover:text-primary-900 hover:underline",children:"GitHub"}),t.jsx("a",{href:"https://docs.openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-600 hover:text-primary-900 hover:underline",children:"OpenClaw docs"})]})]})]})]}),t.jsx("div",{className:"mt-2 flex justify-end",children:t.jsx(Y,{onClick:j,children:"Close"})})]})})})}export{jt as SettingsDialog};
@@ -0,0 +1 @@
1
+ const n=Object.freeze(JSON.parse(`{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"')}])([^\\\\t\\\\n\\\\r \\"\\\\&');->\`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|('))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*(('))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=\`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;\`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\['\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}`)),e=[n],t=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),a=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));export{a,t as b,e as s};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/skills-panel-Cv-N_MDk.js","assets/main-mIHr_ble.js","assets/button-BaHefIXU.js","assets/tabs-BfaEc9zS.js","assets/useControlled-wOKVgKF4.js","assets/useButton-DsMdJPGn.js","assets/useCompositeItem-CaYygSfB.js","assets/DirectionContext-DXnZc0zz.js","assets/CSPContext-BBLAL_m_.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as t,_ as r}from"./main-mIHr_ble.js";const l=t.lazy(()=>r(()=>import("./skills-panel-Cv-N_MDk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(s=>({default:s.SkillsPanel})));function a(){return e.jsx(t.Suspense,{fallback:e.jsx("div",{className:"flex h-screen items-center justify-center text-primary-500 text-sm",children:"Loading…"}),children:e.jsx(l,{})})}export{a as component};
@@ -0,0 +1,5 @@
1
+ import{r as o,j as e,L as H}from"./main-mIHr_ble.js";import{H as m,r as W,h as f,j as D,k as A,y as E,J as I,A as R,l as _,B as J,m as F}from"./button-BaHefIXU.js";import{T as K,a as Q,b as k}from"./tabs-BfaEc9zS.js";import"./useControlled-wOKVgKF4.js";import"./useButton-DsMdJPGn.js";import"./useCompositeItem-CaYygSfB.js";import"./DirectionContext-DXnZc0zz.js";import"./CSPContext-BBLAL_m_.js";async function v(s){const n=await fetch(s);if(!n.ok)throw new Error(`HTTP ${n.status}`);const r=await n.json();if(!r.ok)throw new Error(r.error||"Unknown error");return r.skills}function b(){const[s,n]=o.useState([]),[r,l]=o.useState(!0),[c,a]=o.useState(null),i=o.useCallback(async()=>{l(!0),a(null);try{const t=await v("/api/skills?action=installed");n(t)}catch(t){a(t instanceof Error?t.message:String(t))}finally{l(!1)}},[]);return o.useEffect(()=>{i()},[i]),{skills:s,loading:r,error:c,refresh:i}}function Z(s,n){const[r,l]=o.useState([]),[c,a]=o.useState(!0),[i,t]=o.useState(null);return o.useEffect(()=>{let x=!1;return a(!0),t(null),v(`/api/skills?action=explore&sort=${s}&limit=${n}`).then(d=>{x||l(d)}).catch(d=>{x||t(d instanceof Error?d.message:String(d))}).finally(()=>{x||a(!1)}),()=>{x=!0}},[s,n]),{skills:r,loading:c,error:i}}function q(s){const[n,r]=o.useState([]),[l,c]=o.useState(!1),[a,i]=o.useState(null),t=o.useRef(null);return o.useEffect(()=>{if(t.current&&clearTimeout(t.current),!s.trim()){r([]),c(!1);return}return c(!0),t.current=setTimeout(()=>{v(`/api/skills?action=search&q=${encodeURIComponent(s)}&limit=10`).then(r).catch(x=>i(x instanceof Error?x.message:String(x))).finally(()=>c(!1))},400),()=>{t.current&&clearTimeout(t.current)}},[s]),{skills:n,loading:l,error:a}}function V(){const[s,n]=o.useState([]),[r,l]=o.useState(!0),[c,a]=o.useState(null),i=o.useCallback(async()=>{l(!0),a(null);try{const t=await v("/api/skills?action=my-skills");n(t)}catch(t){a(t instanceof Error?t.message:String(t))}finally{l(!1)}},[]);return o.useEffect(()=>{i()},[i]),{skills:s,loading:r,error:c,refresh:i}}function G(){const[s,n]=o.useState([]),[r,l]=o.useState(!0),[c,a]=o.useState(null),i=o.useCallback(async()=>{l(!0),a(null);try{const t=await v("/api/skills?action=recommended");n(t)}catch(t){a(t instanceof Error?t.message:String(t))}finally{l(!1)}},[]);return o.useEffect(()=>{i()},[i]),{skills:s,loading:r,error:c,refresh:i}}function M(){const[s,n]=o.useState(null),[r,l]=o.useState(null);return{install:o.useCallback(async a=>{n(a),l(null);try{const t=await(await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"install",slug:a})})).json();if(!t.ok)throw new Error(t.error||"Install failed")}catch(i){throw l(i instanceof Error?i.message:String(i)),i}finally{n(null)}},[]),installing:s,error:r}}function X(){const[s,n]=o.useState(null),[r,l]=o.useState(null);return{update:o.useCallback(async a=>{n(a),l(null);try{const t=await(await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",slug:a})})).json();if(!t.ok)throw new Error(t.error||"Update failed")}catch(i){throw l(i instanceof Error?i.message:String(i)),i}finally{n(null)}},[]),updating:s,error:r}}const Y=new Set(["openclaw","clawhub","anthropic","robbyczgw-cla"]),ee=100;function U(s,n){if(n)return{type:"installed",label:"Installed"};const r=s.publisher||s.author||"",l=s.stats?.downloads||0;return Y.has(r.toLowerCase())||l>=ee?{type:"verified",label:"Verified"}:{type:"community",label:"Community"}}function $({type:s,label:n}){const r={verified:"bg-emerald-50 text-emerald-600 border-emerald-100",community:"bg-primary-50 text-primary-500 border-primary-100",installed:"bg-sky-50 text-sky-600 border-sky-100"};return e.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full border ${r[s]}`,title:`${n} Skill`,children:[e.jsx(m,{icon:s==="installed"?I:F,size:10,strokeWidth:2}),n]})}function B({skill:s,installed:n,installing:r,onInstall:l,onUpdate:c,updating:a,showUpdate:i,onClick:t}){const x=s.slug||"",d=s.displayName||x,p=s.summary,h=s.version||s.latestVersion?.version||"",y=s.stats?.downloads,j=U(s,n);return e.jsxs("div",{className:`
2
+ group rounded-lg border border-primary-100 bg-surface p-4
3
+ transition-all duration-150 ease-out
4
+ ${t?"cursor-pointer hover:border-primary-200 hover:shadow-sm":""}
5
+ `,onClick:t,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsx("h4",{className:"text-[13px] font-semibold text-primary-900 leading-tight truncate",children:d}),h&&e.jsx("span",{className:"shrink-0 text-[10px] font-mono text-primary-400",children:h})]}),p&&e.jsx("p",{className:"text-xs text-primary-500 leading-relaxed line-clamp-2 mb-3",children:p}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-primary-50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{...j}),y!==void 0&&y>0&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:A,size:11,strokeWidth:1.5}),y.toLocaleString()]})]}),e.jsxs("div",{className:"flex gap-2",onClick:S=>S.stopPropagation(),children:[i&&c&&e.jsx("button",{onClick:c,disabled:!!a,className:"text-[11px] font-medium text-primary-500 hover:text-primary-700 transition-colors duration-150 disabled:opacity-50",children:a?e.jsx(m,{icon:f,size:12,className:"animate-spin"}):"Update"}),!n&&e.jsx("button",{onClick:l,disabled:r,className:"text-[11px] font-medium text-primary-600 hover:text-primary-800 transition-colors duration-150 disabled:opacity-50",children:r?e.jsx(m,{icon:f,size:12,className:"animate-spin"}):"Install"})]})]})]})}function z(s){return s?new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function se(s){return s>=1e3?`${(s/1e3).toFixed(1)}k`:s.toString()}function te({skill:s,installed:n,installing:r,onInstall:l,onBack:c}){const a=s.slug||"",i=s.displayName||a,t=s.version||s.latestVersion?.version||"",x=U(s,n),d=s.stats?.downloads||0,p=s.tags?Array.isArray(s.tags)?s.tags:Object.keys(s.tags).filter(h=>h!=="latest"):[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("button",{onClick:c,className:"inline-flex items-center gap-1.5 text-xs font-medium text-primary-500 hover:text-primary-700 transition-colors duration-150",children:[e.jsx(m,{icon:W,size:14,strokeWidth:2}),"Back to browse"]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-primary-900 leading-tight",children:i}),t&&e.jsxs("span",{className:"text-xs font-mono text-primary-400",children:["v",t]})]}),e.jsx($,{...x})]}),s.summary&&e.jsx("p",{className:"text-sm text-primary-600 leading-relaxed",children:s.summary})]}),e.jsxs("div",{className:"flex items-center gap-6 py-4 border-y border-primary-100",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-semibold text-primary-900",children:se(d)}),e.jsx("div",{className:"text-[11px] text-primary-400 uppercase tracking-wide",children:"Downloads"})]}),s.stats?.versions!==void 0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-semibold text-primary-900",children:s.stats.versions}),e.jsx("div",{className:"text-[11px] text-primary-400 uppercase tracking-wide",children:"Versions"})]}),s.stats?.stars!==void 0&&s.stats.stars>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-semibold text-primary-900",children:s.stats.stars}),e.jsx("div",{className:"text-[11px] text-primary-400 uppercase tracking-wide",children:"Stars"})]})]}),s.latestVersion?.changelog&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"text-xs font-semibold text-primary-700 uppercase tracking-wide",children:"Latest Release"}),s.latestVersion.createdAt&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:R,size:11,strokeWidth:1.5}),z(s.latestVersion.createdAt)]})]}),e.jsx("p",{className:"text-sm text-primary-600 leading-relaxed",children:s.latestVersion.changelog})]}),p.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(h=>e.jsx("span",{className:"text-[10px] font-medium text-primary-500 bg-primary-50 px-2 py-1 rounded",children:h},h))}),(s.createdAt||s.updatedAt)&&e.jsxs("div",{className:"text-[11px] text-primary-400 space-y-0.5",children:[s.createdAt&&e.jsxs("div",{children:["Published ",z(s.createdAt)]}),s.updatedAt&&e.jsxs("div",{children:["Last updated ",z(s.updatedAt)]})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[n?e.jsxs("div",{className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-lg bg-emerald-50 text-emerald-600 text-sm font-medium border border-emerald-100",children:[e.jsx(m,{icon:I,size:15,strokeWidth:2}),"Installed"]}):e.jsx(J,{onClick:l,disabled:r,className:"flex-1",size:"sm",children:r?e.jsxs(e.Fragment,{children:[e.jsx(m,{icon:f,size:14,className:"animate-spin mr-1.5"}),"Installing…"]}):"Install Skill"}),e.jsxs("a",{href:`https://clawhub.com/skills/${a}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 px-4 py-2 text-sm font-medium text-primary-600 hover:text-primary-800 transition-colors duration-150",children:["View on ClawHub",e.jsx(m,{icon:D,size:14,strokeWidth:1.5})]})]})]})}function ae(){const{skills:s,loading:n,error:r,refresh:l}=b(),{update:c,updating:a}=X(),i=async t=>{try{await c(t),l()}catch{}};return n?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(m,{icon:f,size:18,className:"animate-spin text-primary-300"})}):r?e.jsx("div",{className:"text-sm text-red-500 py-8 text-center",children:r}):s.length===0?e.jsxs("div",{className:"py-12 text-center",children:[e.jsx("p",{className:"text-sm text-primary-400",children:"No skills installed"}),e.jsx("p",{className:"text-xs text-primary-300 mt-1",children:"Browse the catalog to get started"})]}):e.jsx("div",{className:"space-y-3",children:s.map(t=>e.jsx(B,{skill:{slug:t.name,displayName:t.name,version:t.version},installed:!0,installing:!1,onInstall:()=>{},onUpdate:()=>i(t.name),updating:a===t.name,showUpdate:!0},t.name))})}function re(){const{skills:s,loading:n,error:r}=V(),l=o.useMemo(()=>s.reduce((a,i)=>a+(i.stats?.downloads||0),0),[s]),c=o.useMemo(()=>s.reduce((a,i)=>a+(i.stats?.stars||0),0),[s]);return n?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(m,{icon:f,size:18,className:"animate-spin text-primary-300"})}):r?e.jsx("div",{className:"text-sm text-red-500 py-8 text-center",children:r}):s.length===0?e.jsxs("div",{className:"py-12 text-center",children:[e.jsx("p",{className:"text-sm text-primary-400",children:"No skills configured"}),e.jsx("p",{className:"text-xs text-primary-300 mt-1",children:"Add slugs to .clawhub-my-skills.json"})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-6 py-3 px-4 rounded-lg bg-primary-50/60 border border-primary-100",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-semibold text-primary-900",children:s.length}),e.jsx("div",{className:"text-[10px] text-primary-400 uppercase tracking-wide",children:"Skills"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-semibold text-primary-900",children:l.toLocaleString()}),e.jsx("div",{className:"text-[10px] text-primary-400 uppercase tracking-wide",children:"Downloads"})]}),c>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-lg font-semibold text-primary-900",children:c}),e.jsx("div",{className:"text-[10px] text-primary-400 uppercase tracking-wide",children:"Stars"})]})]}),e.jsx("div",{className:"space-y-2",children:s.map(a=>{const i=a.slug||"",t=a.displayName||i,x=a.version||a.latestVersion?.version||"",d=a.stats?.downloads||0,p=a.stats?.stars||0,h=a.stats?.installsAllTime||a.stats?.installsCurrent||0;return e.jsxs("a",{href:`https://clawhub.com/skills/${i}`,target:"_blank",rel:"noopener noreferrer",className:"group block rounded-lg border border-primary-100 bg-surface p-4 transition-all duration-150 ease-out hover:border-primary-200 hover:shadow-sm",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-1.5",children:[e.jsx("h4",{className:"text-[13px] font-semibold text-primary-900 leading-tight truncate group-hover:text-primary-700 transition-colors duration-150",children:t}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[x&&e.jsx("span",{className:"text-[10px] font-mono text-primary-400",children:x}),e.jsx(m,{icon:D,size:12,strokeWidth:1.5,className:"text-primary-300 opacity-0 group-hover:opacity-100 transition-opacity duration-150"})]})]}),a.summary&&e.jsx("p",{className:"text-xs text-primary-500 leading-relaxed line-clamp-2 mb-3",children:a.summary}),e.jsxs("div",{className:"flex items-center gap-4 pt-2 border-t border-primary-50",children:[e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:A,size:11,strokeWidth:1.5}),d.toLocaleString()]}),p>0&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:E,size:11,strokeWidth:1.5}),p]}),h>0&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:I,size:11,strokeWidth:1.5}),h.toLocaleString()]}),a.updatedAt&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1 ml-auto",children:[e.jsx(m,{icon:R,size:11,strokeWidth:1.5}),z(a.updatedAt)]})]})]},i)})})]})}function ne(){const{skills:s,loading:n,error:r}=G(),{skills:l}=b(),{install:c,installing:a}=M(),i=b().refresh,t=o.useMemo(()=>new Set(l.map(d=>d.name)),[l]),x=async d=>{try{await c(d),i()}catch{}};return n?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(m,{icon:f,size:18,className:"animate-spin text-primary-300"})}):r?e.jsx("div",{className:"text-sm text-red-500 py-8 text-center",children:r}):s.length===0?e.jsx("div",{className:"py-12 text-center",children:e.jsx("p",{className:"text-sm text-primary-400",children:"No recommended skills available"})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-primary-500",children:[e.jsx(m,{icon:E,size:14,strokeWidth:1.5,className:"text-amber-400"}),e.jsx("span",{children:"Curated skills we recommend"})]}),e.jsx("div",{className:"grid gap-3",children:s.map(d=>{const p=d.slug||"",h=d.displayName||p,y=t.has(p)||t.has(h);return e.jsxs("div",{className:"group relative rounded-lg border border-primary-100 bg-surface p-4 transition-all duration-150 ease-out hover:border-primary-200 hover:shadow-sm",children:[e.jsx("div",{className:"absolute -top-1.5 -right-1.5",children:e.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 text-[9px] font-medium rounded-full bg-amber-50 text-amber-600 border border-amber-100",children:[e.jsx(m,{icon:E,size:8,strokeWidth:2}),"Pick"]})}),e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsx("h4",{className:"text-[13px] font-semibold text-primary-900 leading-tight truncate",children:h}),d.version&&e.jsx("span",{className:"shrink-0 text-[10px] font-mono text-primary-400",children:d.version})]}),d.summary&&e.jsx("p",{className:"text-xs text-primary-500 leading-relaxed line-clamp-2 mb-3",children:d.summary}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-primary-50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[d.stats?.downloads!==void 0&&d.stats.downloads>0&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:A,size:11,strokeWidth:1.5}),d.stats.downloads.toLocaleString()]}),d.stats?.stars!==void 0&&d.stats.stars>0&&e.jsxs("span",{className:"text-[11px] text-primary-400 flex items-center gap-1",children:[e.jsx(m,{icon:E,size:11,strokeWidth:1.5}),d.stats.stars]})]}),e.jsx("div",{onClick:j=>j.stopPropagation(),children:y?e.jsxs("span",{className:"text-[11px] font-medium text-emerald-500 flex items-center gap-1",children:[e.jsx(m,{icon:I,size:11,strokeWidth:2}),"Installed"]}):e.jsx("button",{onClick:()=>x(p),disabled:a===p,className:"text-[11px] font-medium text-primary-600 hover:text-primary-800 transition-colors duration-150 disabled:opacity-50",children:a===p?e.jsx(m,{icon:f,size:12,className:"animate-spin"}):"Install"})})]})]},p)})})]})}function ie(s,n){return[...s].sort((r,l)=>n==="downloads"?(l.stats?.downloads||0)-(r.stats?.downloads||0):n==="stars"?(l.stats?.stars||0)-(r.stats?.stars||0):n==="updatedAt"?(l.updatedAt||0)-(r.updatedAt||0):0)}function le(){const[s,n]=o.useState("downloads"),[r,l]=o.useState(""),[c,a]=o.useState(null),i=s==="updatedAt"?"newest":s==="stars"?"trending":"downloads",{skills:t,loading:x,error:d}=Z(i,50),{skills:p,loading:h}=q(r),{skills:y}=b(),{install:j,installing:S}=M(),w=o.useMemo(()=>new Set(y.map(u=>u.name)),[y]),P=b().refresh,T=async u=>{try{await j(u),P()}catch{}},N=r.trim().length>0,L=o.useMemo(()=>N?ie(p,s):t,[N,p,t,s]),O=N?h:x;if(c){const u=c.slug||"",g=c.displayName||u,C=w.has(u)||w.has(g);return e.jsx(te,{skill:c,installed:C,installing:S===u,onInstall:()=>T(u),onBack:()=>a(null)})}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(m,{icon:_,size:15,strokeWidth:1.5,className:"absolute left-3 top-1/2 -translate-y-1/2 text-primary-300"}),e.jsx("input",{type:"text",value:r,onChange:u=>l(u.target.value),placeholder:"Search skills…",className:"w-full pl-9 pr-3 py-2 text-sm rounded-lg border border-primary-100 bg-surface placeholder:text-primary-300 focus:outline-none focus:border-primary-300 transition-colors duration-150"})]}),e.jsxs("select",{value:s,onChange:u=>n(u.target.value),className:"shrink-0 text-xs text-primary-600 rounded-md border border-primary-100 bg-surface px-2 py-2 focus:outline-none focus:border-primary-300 transition-colors duration-150",children:[e.jsx("option",{value:"downloads",children:"Most Downloads"}),e.jsx("option",{value:"stars",children:"Most Stars"}),e.jsx("option",{value:"updatedAt",children:"Recently Updated"})]})]}),O?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(m,{icon:f,size:18,className:"animate-spin text-primary-300"})}):d&&!N?e.jsx("div",{className:"text-sm text-red-500 py-8 text-center",children:d}):L.length===0?e.jsx("div",{className:"py-12 text-center",children:e.jsx("p",{className:"text-sm text-primary-400",children:N?"No skills found":"No skills available"})}):e.jsx("div",{className:"space-y-3",children:L.map(u=>{const g=u.slug||u.name||"",C=u.displayName||g;return e.jsx(B,{skill:u,installed:w.has(g)||w.has(C),installing:S===g,onInstall:()=>T(g),onClick:()=>a(u)},g)})})]})}function ye(){const[s,n]=o.useState("installed"),{skills:r,loading:l}=V(),c=!l&&r.length>0;return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"px-4 pt-4 pb-3 border-b border-primary-100",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(H,{to:"/chat/$sessionKey",params:{sessionKey:"main"},className:"p-1.5 -ml-1.5 rounded-md text-primary-500 hover:text-primary-700 hover:bg-primary-50 transition-colors duration-150","aria-label":"Back to Chat",children:e.jsx(m,{icon:W,size:18,strokeWidth:2})}),e.jsx("h2",{className:"text-base font-semibold text-primary-900",children:"Skills"})]}),e.jsx(K,{value:s,onValueChange:n,children:e.jsxs(Q,{variant:"default",className:"gap-2 *:data-[slot=tab-indicator]:duration-0",children:[e.jsx(k,{value:"installed",children:e.jsx("span",{className:"text-xs",children:"Installed"})}),c&&e.jsx(k,{value:"my-skills",children:e.jsx("span",{className:"text-xs",children:"My Skills"})}),e.jsx(k,{value:"recommended",children:e.jsx("span",{className:"text-xs",children:"Recommended"})}),e.jsx(k,{value:"browse",children:e.jsx("span",{className:"text-xs",children:"Browse"})})]})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-4 pb-4 pt-4",children:[s==="installed"&&e.jsx(ae,{}),s==="my-skills"&&e.jsx(re,{}),s==="recommended"&&e.jsx(ne,{}),s==="browse"&&e.jsx(le,{})]})]})}export{ye as SkillsPanel};
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse('{"displayName":"SQL","name":"sql","patterns":[{"match":"((?<!@)@)\\\\b(\\\\w+)\\\\b","name":"text.variable"},{"match":"(\\\\[)[^]]*(])","name":"text.bracketed"},{"include":"#comments"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"},"5":{"name":"entity.name.function.sql"}},"match":"(?i:^\\\\s*(create(?:\\\\s+or\\\\s+replace)?)\\\\s+(aggregate|conversion|database|domain|function|group|(unique\\\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)([\\"\'`]?)(\\\\w+)\\\\4","name":"meta.create.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"}},"match":"(?i:^\\\\s*(drop)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"},"3":{"name":"entity.name.function.sql"},"4":{"name":"keyword.other.cascade.sql"}},"match":"(?i:\\\\s*(drop)\\\\s+(table)\\\\s+(\\\\w+)(\\\\s+cascade)?\\\\b)","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"}},"match":"(?i:^\\\\s*(alter)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)","name":"meta.alter.sql"},{"captures":{"1":{"name":"storage.type.sql"},"2":{"name":"storage.type.sql"},"3":{"name":"constant.numeric.sql"},"4":{"name":"storage.type.sql"},"5":{"name":"constant.numeric.sql"},"6":{"name":"storage.type.sql"},"7":{"name":"constant.numeric.sql"},"8":{"name":"constant.numeric.sql"},"9":{"name":"storage.type.sql"},"10":{"name":"constant.numeric.sql"},"11":{"name":"storage.type.sql"},"12":{"name":"storage.type.sql"},"13":{"name":"storage.type.sql"},"14":{"name":"constant.numeric.sql"},"15":{"name":"storage.type.sql"}},"match":"(?i)\\\\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\\\b|\\\\b(bit\\\\svarying|character\\\\s(?:varying)?|tinyint|var\\\\schar|float|interval)\\\\((\\\\d+)\\\\)|\\\\b(char|number|varchar\\\\d?)\\\\b(?:\\\\((\\\\d+)\\\\))?|\\\\b(numeric|decimal)\\\\b(?:\\\\((\\\\d+),(\\\\d+)\\\\))?|\\\\b(times?)\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\swith(?:out)?\\\\stime\\\\szone\\\\b)?|\\\\b(timestamp)(s|tz)?\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\s(with(?:|out))\\\\stime\\\\szone\\\\b)?"},{"match":"(?i:\\\\b((?:primary|foreign)\\\\s+key|references|on\\\\s+(delete|update)(\\\\s+cascade)?|nocheck|check|constraint|collate|default)\\\\b)","name":"storage.modifier.sql"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.sql"},{"match":"(?i:\\\\b(select(\\\\s+(all|distinct))?|insert\\\\s+(ignore\\\\s+)?into|update|delete|from|set|where|group\\\\s+by|or|like|and|union(\\\\s+all)?|having|order\\\\s+by|limit|cross\\\\s+join|join|straight_join|(inner|(left|right|full)(\\\\s+outer)?)\\\\s+join|natural(\\\\s+(inner|(left|right|full)(\\\\s+outer)?))?\\\\s+join)\\\\b)","name":"keyword.other.DML.sql"},{"match":"(?i:\\\\b(on|off|((is\\\\s+)?not\\\\s+)?null)\\\\b)","name":"keyword.other.DDL.create.II.sql"},{"match":"(?i:\\\\bvalues\\\\b)","name":"keyword.other.DML.II.sql"},{"match":"(?i:\\\\b(begin(\\\\s+work)?|start\\\\s+transaction|commit(\\\\s+work)?|rollback(\\\\s+work)?)\\\\b)","name":"keyword.other.LUW.sql"},{"match":"(?i:\\\\b(grant(\\\\swith\\\\sgrant\\\\soption)?|revoke)\\\\b)","name":"keyword.other.authorization.sql"},{"match":"(?i:\\\\bin\\\\b)","name":"keyword.other.data-integrity.sql"},{"match":"(?i:^\\\\s*(comment\\\\s+on\\\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\\\s+)","name":"keyword.other.object-comments.sql"},{"match":"(?i)\\\\bAS\\\\b","name":"keyword.other.alias.sql"},{"match":"(?i)\\\\b(DESC|ASC)\\\\b","name":"keyword.other.order.sql"},{"match":"\\\\*","name":"keyword.operator.star.sql"},{"match":"[!<>]?=|<>|[<>]","name":"keyword.operator.comparison.sql"},{"match":"[-+/]","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdevp??|varp??)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b((?:bit_coun|get_bi|left_shif|right_shif|set_bi)t)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?<!@)@@(?i)\\\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.json.sql"}},"match":"(?i)\\\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.logical.sql"}},"match":"(?i)\\\\b(choose|iif|greatest|least)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.mathematical.sql"}},"match":"(?i)\\\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.metadata.sql"}},"match":"(?i)\\\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.ranking.sql"}},"match":"(?i)\\\\b(rank|dense_rank|ntile|row_number)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.rowset.sql"}},"match":"(?i)\\\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.security.sql"}},"match":"(?i)\\\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.string.sql"}},"match":"(?i)\\\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.system.sql"}},"match":"(?i)\\\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.textimage.sql"}},"match":"(?i)\\\\b(patindex|textptr|textvalid)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.vector.sql"}},"match":"(?i)\\\\b(vector_(?:distance|norm|normalize))\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"constant.other.database-name.sql"},"2":{"name":"constant.other.table-name.sql"}},"match":"(\\\\w+?)\\\\.(\\\\w+)"},{"include":"#strings"},{"include":"#regexps"},{"match":"\\\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\\\\\s+or\\\\\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime2??|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|sessions??|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablockx??|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|top??|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|values??|varbinary|varchar|vector|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows??|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\\\b","name":"keyword.other.sql"},{"captures":{"1":{"name":"punctuation.section.scope.begin.sql"},"2":{"name":"punctuation.section.scope.end.sql"}},"match":"(\\\\()(\\\\))","name":"meta.block.sql"}],"repository":{"comment-block":{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\*/","name":"comment.block","patterns":[{"include":"#comment-block"}]},"comments":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\n","name":"comment.line.double-dash.sql"}]},{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[]},{"include":"#comment-block"}]},"regexps":{"patterns":[{"begin":"/(?=\\\\S.*/)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.sql","patterns":[{"include":"#string_interpolation"},{"match":"\\\\\\\\/","name":"constant.character.escape.slash.sql"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.modr.sql","patterns":[{"include":"#string_interpolation"}]}]},"string_escape":{"match":"\\\\\\\\.","name":"constant.character.escape.sql"},"string_interpolation":{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(#\\\\{)([^}]*)(})","name":"string.interpolated.sql"},"strings":{"patterns":[{"captures":{"2":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(N)?(\')[^\']*(\')","name":"string.quoted.single.sql"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.single.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(`)[^\\\\\\\\`]*(`)","name":"string.quoted.other.backtick.sql"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.other.backtick.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\\")[^\\"#]*(\\")","name":"string.quoted.double.sql"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.double.sql","patterns":[{"include":"#string_interpolation"}]},{"begin":"%\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.other.quoted.brackets.sql","patterns":[{"include":"#string_interpolation"}]}]}},"scopeName":"source.sql"}')),t=[e];export{t as default};